BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Classes | Protected Member Functions
BALL::MOLFile Class Reference

#include <BALL/FORMAT/MOLFile.h>

Inheritance diagram for BALL::MOLFile:
BALL::GenericMolFile BALL::LineBasedFile BALL::File BALL::SDFile

List of all members.

Classes

class  AtomStruct
class  BondStruct
class  CountsStruct
struct  Property

Public Member Functions

Constructors and Destructors
 MOLFile ()
 MOLFile (const String &filename, File::OpenMode open_mode=std::ios::in)
virtual ~MOLFile ()
 Destructor.
Reading and Writing of Kernel Datastructures
virtual bool write (const Molecule &molecule)
virtual bool write (const System &system)
virtual bool read (System &system)
virtual Molecule * read ()
const MOLFile & operator= (const MOLFile &file)

Protected Member Functions

Molecule * readCTAB_ (std::vector< Atom * > &atom_map)
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
static const String counts_format_
 The format of the counts line.
static const String atom_format_
 The format of an entry of the atom block.
static 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.

Definition at line 27 of file MOLFile.h.


Constructor & Destructor Documentation

Default constructor

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

Detailed constructor.

Exceptions:
Exception::FileNotFoundif the file could not be opened
virtual BALL::MOLFile::~MOLFile ( ) [virtual]

Destructor.


Member Function Documentation

const MOLFile& BALL::MOLFile::operator= ( const MOLFile &  file)
virtual bool BALL::MOLFile::read ( System &  system) [virtual]

Read a system from the MOL file

Exceptions:
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

Reimplemented in BALL::SDFile.

virtual Molecule* BALL::MOLFile::read ( ) [virtual]

Read a single molecule from the file

Exceptions:
Exception::ParseErrorif a syntax error was encountered

Reimplemented from BALL::GenericMolFile.

Reimplemented in BALL::SDFile.

bool BALL::MOLFile::readAtomLine_ ( AtomStruct &  atom) [protected]

Read a line from the atom block.

bool BALL::MOLFile::readBondLine_ ( BondStruct &  bond) [protected]

Read a line from the bond block.

Read the Counts line of a MOL file.

Molecule* BALL::MOLFile::readCTAB_ ( std::vector< Atom * > &  atom_map) [protected]

Read the CTAB of a MOL file and construct a Molecule from its data

Exceptions:
Exception::ParseErrorif a syntax error was encountered
virtual bool BALL::MOLFile::write ( const Molecule &  molecule) [virtual]

Write a molecule to the MOL file

Exceptions:
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

Reimplemented in BALL::SDFile.

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

Write a system to the MOL file.

Exceptions:
File::CannotWriteif writing to the file failed

Reimplemented from BALL::GenericMolFile.

Reimplemented in BALL::SDFile.

void BALL::MOLFile::writeAtomLine_ ( const AtomStruct &  atom) [protected]

Write a line of the atom block.

void BALL::MOLFile::writeBondLine_ ( const BondStruct &  bond) [protected]

Write a line of the bond block.

void BALL::MOLFile::writeCountsLine_ ( const CountsStruct &  counts) [protected]

Write the Counts line.


Member Data Documentation

const String BALL::MOLFile::atom_format_ [static, protected]

The format of an entry of the atom block.

Definition at line 177 of file MOLFile.h.

const String BALL::MOLFile::bond_format_ [static, protected]

The format of an entry of the bond block.

Definition at line 180 of file MOLFile.h.

const String BALL::MOLFile::counts_format_ [static, protected]

The format of the counts line.

Definition at line 174 of file MOLFile.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines