#include <BALL/FORMAT/HINFile.h>
Public Member Functions | |
Constructors and Destructors | |
HINFile () | |
HINFile (const String &filename, File::OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound) | |
virtual | ~HINFile () |
Assignment. | |
const HINFile & | operator= (const HINFile &rhs) throw (Exception::FileNotFound) |
Reading and Writing of Kernel Datastructures | |
virtual bool | write (const Molecule &molecule) throw (File::CannotWrite) |
virtual bool | write (const System &system) throw (File::CannotWrite) |
virtual Molecule * | read () throw (Exception::ParseError) |
virtual bool | read (System &system) throw (Exception::ParseError) |
Accessors | |
bool | hasPeriodicBoundary () const |
SimpleBox3 | getPeriodicBoundary () const |
float | getTemperature () const |
Protected Member Functions | |
virtual void | initRead_ () |
Initialize temperature and box dimensions prior to reading a system. | |
void | writeAtom_ (const Atom &atom, Size number, Size atom_offset) |
Protected Attributes | |
SimpleBox3 | box_ |
float | temperature_ |
HyperChem file class. This class enables BALL to read and write HyperChem HIN files.
Note: HIN defines a Molecule as a connected component in the molecule graph If you read e.g. a protein from a PDBFile, such that no bonds are set each atom will be placed into its own molecule. To prevent this from happening use the FragmentDB to build missing bonds.
Definition at line 29 of file HINFile.h.
BALL::HINFile::HINFile | ( | ) |
Default constructor
BALL::HINFile::HINFile | ( | const String & | filename, | |
File::OpenMode | open_mode = std::ios::in | |||
) | throw (Exception::FileNotFound) |
Detailed constructor
virtual BALL::HINFile::~HINFile | ( | ) | [virtual] |
Destructor
SimpleBox3 BALL::HINFile::getPeriodicBoundary | ( | ) | const |
Return the periodic boundary of the file. An emptry box is returned if no periodic boundary is defined.
float BALL::HINFile::getTemperature | ( | ) | const |
Return the temperature stored in the file. HIN files may contain a sys
entry containing the temperature of the last simulation step. If it is set, it is returned. Otherwise 0 is returned.
bool BALL::HINFile::hasPeriodicBoundary | ( | ) | const |
Check for a periodic boundary in the file.
virtual void BALL::HINFile::initRead_ | ( | ) | [protected, virtual] |
Initialize temperature and box dimensions prior to reading a system.
Reimplemented from BALL::GenericMolFile.
const HINFile& BALL::HINFile::operator= | ( | const HINFile & | rhs | ) | throw (Exception::FileNotFound) |
Assignment operator.
virtual bool BALL::HINFile::read | ( | System & | system | ) | throw (Exception::ParseError) [virtual] |
Read a system. This method will read all molecules contained in the file and add them to the system.
Exception::ParseError | if the file could not be parsed while reading a molecule |
Reimplemented from BALL::GenericMolFile.
virtual Molecule* BALL::HINFile::read | ( | ) | throw (Exception::ParseError) [virtual] |
Read a system from the HIN file
Reimplemented from BALL::GenericMolFile.
virtual bool BALL::HINFile::write | ( | const System & | system | ) | throw (File::CannotWrite) [virtual] |
Write a system to a HIN file. Note that this changes the properties of atoms in the system.
Reimplemented from BALL::GenericMolFile.
virtual bool BALL::HINFile::write | ( | const Molecule & | molecule | ) | throw (File::CannotWrite) [virtual] |
Write a molecule to a HIN file. Note that this changes the properties of atoms in the system.
Reimplemented from BALL::GenericMolFile.
SimpleBox3 BALL::HINFile::box_ [protected] |
float BALL::HINFile::temperature_ [protected] |