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

HyperChem file class. More...

#include <HINFile.h>

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

List of all members.


Public Member Functions

Constructors and Destructors
HINFile ()
Default constructor.
HINFile (const HINFile &file) throw (Exception::FileNotFound)
Copy constructor.
HINFile (const String &filename, File::OpenMode open_mode=std::ios::in) throw (Exception::FileNotFound)
Detailed constructor.
virtual ~HINFile ()
Destructor.
Assignment.
const HINFile & operator= (const HINFile &rhs) throw (Exception::FileNotFound)
Assignment operator.
Reading and Writing of Kernel Datastructures
virtual bool write (const Molecule &molecule) throw (File::CannotWrite)
Write a molecule to a HIN file.
virtual bool write (const System &system) throw (File::CannotWrite)
Write a system to a HIN file.
virtual Molecule * read () throw (Exception::ParseError)
Read a system from the HIN file.
virtual bool read (System &system) throw (Exception::ParseError)
Read a system.
Accessors
bool hasPeriodicBoundary () const
Check for a periodic boundary in the file.
SimpleBox3 getPeriodicBoundary () const
Return the periodic boundary of the file.
float getTemperature () const
Return the temperature stored in the file.

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.


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

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 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.


Generated on Thu Aug 6 18:30:29 2009 for BALL by doxygen 1.5.8