#include <BALL/FORMAT/TRRFile.h>
Classes | |
| class | TRRHeader |
Public Member Functions | |
Constructors and Destructor | |
| TRRFile () | |
Default constructor. | |
| TRRFile (const TRRFile &file) throw (Exception::FileNotFound) | |
Copy constructor. | |
| TRRFile (const String &name, File::OpenMode open_mode=std::ios::in) | |
Construct and open a file. | |
| virtual | ~TRRFile () |
Destructor. | |
Assignment | |
| const TRRFile & | operator= (const TRRFile &file) |
Assignment operator. | |
| virtual void | clear () |
Clear method. | |
Predicates | |
| bool | operator== (const TRRFile &file) const |
Equality operator. | |
Public methods for file handling | |
| virtual bool | init () |
Initialize the file for usage. | |
| virtual bool | writeNextHeader (const TRRHeader &header) |
| virtual bool | readNextHeader (TRRHeader &header) |
| virtual bool | append (const SnapShot &snapshot) |
| virtual bool | read (SnapShot &snapshot) |
| virtual TRRFile & | operator>> (SnapShotManager &ssm) |
Read the whole file into a SnapShotManager. | |
| virtual bool | flushToDisk (const std::vector< SnapShot > &buffer) throw (File::CannotWrite) |
Accessors | |
| bool | hasVelocities () const |
| void | setVelocityStorage (bool storage) |
| bool | hasForces () const |
| void | setForceStorage (bool storage) |
| Size | getPrecision () const |
| bool | setPrecision (const Size precision) |
| float | getTimestep () const |
| void | setTimestep (float timestep) |
| Vector3 | getBoundingBoxX () const |
| Vector3 | getBoundingBoxY () const |
| Vector3 | getBoundingBoxZ () const |
| void | setBoundingBox (const Vector3 &x, const Vector3 &y, const Vector3 &z) |
Protected Attributes | |
| TRRHeader | header_ |
| Size | precision_ |
| bool | has_velocities_ |
| bool | has_forces_ |
| Size | timestep_index_ |
| float | timestep_ |
| Vector3 | box1_ |
| Vector3 | box2_ |
| Vector3 | box3_ |
| BinaryFileAdaptor< Size > | adapt_size_ |
| BinaryFileAdaptor< char > | adapt_char_ |
| BinaryFileAdaptor< float > | adapt_float_ |
| BinaryFileAdaptor< double > | adapt_double_ |
TRR Trajectory file format. This class enables BALL to read and write GROMACS TRR files. This format is portable.
| BALL::TRRFile::TRRFile | ( | ) |
Default constructor.
| BALL::TRRFile::TRRFile | ( | const TRRFile & | file | ) | throw (Exception::FileNotFound) |
Copy constructor.
| BALL::TRRFile::TRRFile | ( | const String & | name, | |
| File::OpenMode | open_mode = std::ios::in | |||
| ) |
Construct and open a file.
| virtual BALL::TRRFile::~TRRFile | ( | ) | [virtual] |
Destructor.
Append a SnapShot to an existing file
| snapshot | the SnapShot we want to store |
Reimplemented from BALL::TrajectoryFile.
| virtual void BALL::TRRFile::clear | ( | ) | [virtual] |
Clear method.
Reimplemented from BALL::TrajectoryFile.
| virtual bool BALL::TRRFile::flushToDisk | ( | const std::vector< SnapShot > & | buffer | ) | throw (File::CannotWrite) [virtual] |
Write several SnapShots to disk.
| buffer | a vector of snapshots |
Reimplemented from BALL::TrajectoryFile.
| Vector3 BALL::TRRFile::getBoundingBoxX | ( | ) | const |
| Vector3 BALL::TRRFile::getBoundingBoxY | ( | ) | const |
| Vector3 BALL::TRRFile::getBoundingBoxZ | ( | ) | const |
| Size BALL::TRRFile::getPrecision | ( | ) | const |
| float BALL::TRRFile::getTimestep | ( | ) | const |
| bool BALL::TRRFile::hasForces | ( | ) | const |
| bool BALL::TRRFile::hasVelocities | ( | ) | const |
| virtual bool BALL::TRRFile::init | ( | ) | [virtual] |
Initialize the file for usage.
| virtual TRRFile& BALL::TRRFile::operator>> | ( | SnapShotManager & | ssm | ) | [virtual] |
Read the whole file into a SnapShotManager.
Read the next snapshot from the file
| snapshot | a buffer for result delivery |
Reimplemented from BALL::TrajectoryFile.
Reads the next header preceding the next data block.
| header | a buffer for result delivery |
| void BALL::TRRFile::setForceStorage | ( | bool | storage | ) |
| void BALL::TRRFile::setTimestep | ( | float | timestep | ) |
| void BALL::TRRFile::setVelocityStorage | ( | bool | storage | ) |
Writes the next header that shall preceed the next data block.
| header | the TRRHeader we want to write |
BinaryFileAdaptor<char> BALL::TRRFile::adapt_char_ [protected] |
BinaryFileAdaptor<double> BALL::TRRFile::adapt_double_ [protected] |
BinaryFileAdaptor<float> BALL::TRRFile::adapt_float_ [protected] |
BinaryFileAdaptor<Size> BALL::TRRFile::adapt_size_ [protected] |
Vector3 BALL::TRRFile::box1_ [protected] |
Vector3 BALL::TRRFile::box2_ [protected] |
Vector3 BALL::TRRFile::box3_ [protected] |
bool BALL::TRRFile::has_forces_ [protected] |
bool BALL::TRRFile::has_velocities_ [protected] |
TRRHeader BALL::TRRFile::header_ [protected] |
Size BALL::TRRFile::precision_ [protected] |
float BALL::TRRFile::timestep_ [protected] |
Size BALL::TRRFile::timestep_index_ [protected] |