Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

MOLFile Class Reference
[Molecular structure file formats]

MDL MOL file class. More...

#include <MOLFile.h>

Inheritance diagram for MOLFile:

GenericMolFile LineBasedFile File SDFile List of all members.

Public Member Functions

Constructors and Destructors
 MOLFile () throw ()
 Default constructor.
 MOLFile (const String &filename, File::OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound)
 Detailed constructor.
 MOLFile (const MOLFile &file) throw (Exception::FileNotFound)
 Copy constructor.
virtual ~MOLFile () throw ()
 Destructor.
Reading and Writing of Kernel Datastructures
virtual bool write (const Molecule &molecule) throw (File::CannotWrite)
 Write a molecule to the file.
virtual bool write (const System &system) throw (File::CannotWrite)
 Write a system to the MOL file.
virtual bool read (System &system) throw (Exception::ParseError)
 Read a system from the MOL file.
virtual Moleculeread () throw (Exception::ParseError)
 Read a single molecule from the file.
const MOLFileoperator= (const MOLFile &file) throw ()

Protected Member Functions

MoleculereadCTAB_ (std::vector< Atom * > &atom_map) throw (Exception::ParseError)
 Read the CTAB of a MOL file and construct a Molecule from its data.
bool readCountsLine_ (CountsStruct &counts)
 Read the Counts line of a MOL file.
bool readAtomLine_ (AtomStruct &atom)
 Read a line from the atom block.
bool readBondLine_ (BondStruct &bond)
 Read a line from the bond block.
void writeCountsLine_ (const CountsStruct &counts)
 Write the Counts line.
void writeAtomLine_ (const AtomStruct &atom)
 Write a line of the atom block.
void writeBondLine_ (const BondStruct &bond)
 Write a line of the bond block.

Static Protected Attributes

Format definitions
const String counts_format_
 The format of the counts line.
const String atom_format_
 The format of an entry of the atom block.
const String bond_format_
 The format of an entry of the bond block.

Detailed Description

MDL MOL file class.

This class enables BALL to read and write MDL MOL files.


Constructor & Destructor Documentation

MOLFile::MOLFile const String filename,
File::OpenMode  open_mode = std::ios::in
throw (Exception::FileNotFound)
 

Detailed constructor.


Member Function Documentation

virtual bool MOLFile::write const System system  )  throw (File::CannotWrite) [virtual]
 

Write a system to the MOL file.

Note that this changes the properties of atoms in the system.

Reimplemented from GenericMolFile.

Reimplemented in SDFile.