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

#include <BALL/FORMAT/HINFile.h>

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

List of all members.

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 HINFileoperator= (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 Moleculeread () 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_

Detailed Description

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.


Constructor & Destructor Documentation

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


Member Function Documentation

SimpleBox3 BALL::HINFile::getPeriodicBoundary (  )  const

Return the periodic boundary of the file. An emptry box is returned if no periodic boundary is defined.

Returns:
the boundary box
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.

Returns:
the final simulation temperature
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.

The default implementation calls read() until false is returned and adds the molecules read to the system.
Returns:
true if anything could be read
Exceptions:
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.

void BALL::HINFile::writeAtom_ ( const Atom atom,
Size  number,
Size  atom_offset 
) [protected]

Member Data Documentation

Definition at line 115 of file HINFile.h.

Definition at line 120 of file HINFile.h.

Generated by  doxygen 1.6.3