BALL::MOL2File Class Reference
[Molecular structure file formats]

#include <BALL/FORMAT/MOL2File.h>

Inheritance diagram for BALL::MOL2File:
Inheritance graph
[legend]

List of all members.

Classes

struct  AtomStruct
struct  BondStruct
struct  CommentStruct
struct  MoleculeStruct
struct  SetStruct
 A class used for storing TRIPOS sets. More...
struct  SubstructureStruct

Public Member Functions

Constructors and Destructors

 MOL2File ()
 MOL2File (const String &filename, File::OpenMode open_mode=std::ios::in)
virtual ~MOL2File ()
 Destructor.
Reading and Writing of Kernel Datastructures

virtual bool write (const System &system)
virtual bool read (System &system)
virtual Moleculeread ()
virtual bool write (const Molecule &molecule)
const MOL2Fileoperator= (const MOL2File &file)
Size getNumberOfSets () const
 Return the number of TRIPOS-Sets defined in this instance.
SetStructgetSet (Position i)
 Return the i-th TRIPOS set. NOTE: no range checking is performed.
const SetStructgetSet (Position i) const
 Return the i-th TRIPOS set, const version. NOTE: no range checking is performed.

Static Public Attributes

Constants

static const String TRIPOS

Protected Member Functions

void readAtomSection_ ()
void readBondSection_ ()
void readMoleculeSection_ ()
void readSetSection_ ()
void readSubstructureSection_ ()
void readCommentSection_ ()
String getSybylType_ (const Atom &atom) const
bool nextLine_ ()
void clear_ ()
bool buildAll_ (Molecule &molecule)
bool containsAtomChilds_ (AtomContainerConstIterator &frag_it)

Protected Attributes

vector< AtomStructatoms_
vector< BondStructbonds_
vector< SetStructsets_
vector< SubstructureStructsubstructures_
vector< CommentStructcomments_
MoleculeStruct molecule_
Size number_of_lines_
char buffer_ [4096]
String line_
 buffer for the line in use
bool found_next_header_

Static Protected Attributes

static const Size MAX_LENGTH_

Detailed Description

SYBYL MOL2 file class. This class is used to read and write SYBYL MOL2 files (Tripos).

Definition at line 30 of file MOL2File.h.


Constructor & Destructor Documentation

BALL::MOL2File::MOL2File (  ) 

Default constructor

BALL::MOL2File::MOL2File ( const String filename,
File::OpenMode  open_mode = std::ios::in 
)

Detailed constructor

Exceptions:
Exception::FileNotFound if the file could not be opened
virtual BALL::MOL2File::~MOL2File (  )  [virtual]

Destructor.


Member Function Documentation

bool BALL::MOL2File::buildAll_ ( Molecule molecule  )  [protected]
void BALL::MOL2File::clear_ (  )  [protected]
bool BALL::MOL2File::containsAtomChilds_ ( AtomContainerConstIterator frag_it  )  [protected]
Size BALL::MOL2File::getNumberOfSets (  )  const [inline]

Return the number of TRIPOS-Sets defined in this instance.

Definition at line 105 of file MOL2File.h.

const SetStruct& BALL::MOL2File::getSet ( Position  i  )  const [inline]

Return the i-th TRIPOS set, const version. NOTE: no range checking is performed.

Definition at line 111 of file MOL2File.h.

SetStruct& BALL::MOL2File::getSet ( Position  i  )  [inline]

Return the i-th TRIPOS set. NOTE: no range checking is performed.

Definition at line 108 of file MOL2File.h.

String BALL::MOL2File::getSybylType_ ( const Atom atom  )  const [protected]
bool BALL::MOL2File::nextLine_ (  )  [protected]
const MOL2File& BALL::MOL2File::operator= ( const MOL2File file  ) 
virtual Molecule* BALL::MOL2File::read (  )  [virtual]

Read a molecule from the MOL2 file

Exceptions:
Exception::ParseError if a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

virtual bool BALL::MOL2File::read ( System system  )  [virtual]

Read a system from the MOL2 file

Exceptions:
Exception::ParseError if a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

void BALL::MOL2File::readAtomSection_ (  )  [protected]
void BALL::MOL2File::readBondSection_ (  )  [protected]
void BALL::MOL2File::readCommentSection_ (  )  [protected]
void BALL::MOL2File::readMoleculeSection_ (  )  [protected]
void BALL::MOL2File::readSetSection_ (  )  [protected]
void BALL::MOL2File::readSubstructureSection_ (  )  [protected]
virtual bool BALL::MOL2File::write ( const Molecule molecule  )  [virtual]

Write a molecule to a HIN file.

Exceptions:
File::CannotWrite if writing to the file failed

Reimplemented from BALL::GenericMolFile.

virtual bool BALL::MOL2File::write ( const System system  )  [virtual]

Write a system to the MOL2 file

Exceptions:
File::CannotWrite if writing to the file failed

Reimplemented from BALL::GenericMolFile.


Member Data Documentation

vector<AtomStruct> BALL::MOL2File::atoms_ [protected]

Definition at line 188 of file MOL2File.h.

vector<BondStruct> BALL::MOL2File::bonds_ [protected]

Definition at line 189 of file MOL2File.h.

char BALL::MOL2File::buffer_[4096] [protected]

Definition at line 197 of file MOL2File.h.

Definition at line 192 of file MOL2File.h.

Definition at line 199 of file MOL2File.h.

buffer for the line in use

Reimplemented from BALL::LineBasedFile.

Definition at line 198 of file MOL2File.h.

const Size BALL::MOL2File::MAX_LENGTH_ [static, protected]

Definition at line 196 of file MOL2File.h.

Definition at line 193 of file MOL2File.h.

Definition at line 195 of file MOL2File.h.

vector<SetStruct> BALL::MOL2File::sets_ [protected]

Definition at line 190 of file MOL2File.h.

Definition at line 191 of file MOL2File.h.

Tripos Record Type Identifier (RTI)

Definition at line 56 of file MOL2File.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3