#include <genericMolFile.h>
Inheritance diagram for GenericMolFile:
Public Member Functions | |
Constructors and Destructors | |
GenericMolFile () throw () | |
Default constructor. | |
GenericMolFile (const String &filename, File::OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound) | |
Detailed constructor. | |
GenericMolFile (const GenericMolFile &file) throw (Exception::FileNotFound) | |
Copy constructor. | |
virtual | ~GenericMolFile () throw () |
Destructor. | |
Assignment | |
const GenericMolFile & | operator= (const GenericMolFile &rhs) throw (Exception::FileNotFound) |
Assignment operator. | |
Reading and Writing of Kernel Datastructures | |
virtual bool | write (const System &system) throw (File::CannotWrite) |
Write the molecules of a system. | |
virtual bool | write (const Molecule &molecule) throw (File::CannotWrite) |
Write a molecule. | |
virtual bool | read (System &system) throw (Exception::ParseError) |
Read a system. | |
virtual Molecule * | read () throw (Exception::ParseError) |
Read a molecule. | |
Operators | |
virtual GenericMolFile & | operator>> (System &system) throw (Exception::ParseError) |
Stream operator for reading a system. | |
virtual GenericMolFile & | operator<< (const System &system) throw (File::CannotWrite) |
Stream operator for writing a system of molecules. | |
virtual GenericMolFile & | operator>> (Molecule &molecule) throw (Exception::ParseError) |
Stream operator for reading a molecule. | |
virtual GenericMolFile & | operator<< (const Molecule &molecule) throw (File::CannotWrite) |
Stream operator for writing a system of molecules. | |
Protected Member Functions | |
virtual void | initRead_ () |
Initialize internals for read. | |
virtual void | initWrite_ () |
Initialize internals for write. |
This class provides an interface for all molecular structure formats (except for PDB files, due to their complex and capricious structure and contents).
|
Initialize internals for read. This method is called by the default implementation of read(System& system) . Its purpose is the initialization of internal members holding, for example, header information from the file. The default implementation provided is empty. Reimplemented in GAMESSDatFile, GAMESSLogFile, and HINFile. |
|
Initialize internals for write. Same functionality as initRead , but is called prior to writing a system. |
|
Stream operator for writing a system of molecules. Calls write() Reimplemented in PDBFile. |
|
Stream operator for writing a system of molecules. Calls write(const System& system) const . Reimplemented in PDBFile. |
|
Assignment operator. Create a new object pointing to the same filename. |
|
Stream operator for reading a molecule. Calls read() Reimplemented in PDBFile. |
|
Stream operator for reading a system. Calls read(System&) . Reimplemented in PDBFile. |
|
Read a molecule. This method will load the first (or the next, on subsequent invocation) molecule from the file. If the file format does not support multiple molecules, only the first call to read will be successful. This method will create an instance of molecule and its the user's responsibility to destroy that molecule.
Reimplemented in GAMESSDatFile, GAMESSLogFile, HINFile, KCFFile, MOL2File, MOLFile, and SDFile. |
|
Read a system. This method will read all molecules contained in the file and add them to the system.
Reimplemented in GAMESSDatFile, GAMESSLogFile, HINFile, KCFFile, MOL2File, MOLFile, PDBFile, and SDFile. |
|
Write a molecule. Repeated invocations of this method append molecules to the same file.
Reimplemented in GAMESSDatFile, GAMESSLogFile, HINFile, KCFFile, MOL2File, MOLFile, PDBFile, and SDFile. |
|
Write the molecules of a system. If the file format does not support multiple molecules in a single file, a warning should be printed and only the first molecule should be stored.
Reimplemented in GAMESSDatFile, GAMESSLogFile, HINFile, KCFFile, MOL2File, MOLFile, and SDFile. |