#include <BALL/FORMAT/DCDFile.h>
List of all members.
Detailed Description
DCD Trajectory file format. This class enables BALL to write DCD files that can be read by VMD. The format stems from the xplor package. This format is NOT portable.
- The header is described in the documentation for the nested DCDHeader class.
- Header of a DCD file: Got this description from http://www.arl.hpc.mil/PET/cta/ccm/software/fmd/Docs/html/fmd_ug.html. Quote: "The exact format of these files is quite ugly, as it reproduces the binary record format of unformatted FORTRAN files. Each such "record" begins with 4 bytes containing the integer value of the number of bytes in the following record. It ends with a record containing the same 4 bytes."
- The header consists of several blocks. Each block starts and ends with the number of bytes enclosed between those numbers, i. e. a block consisting of 8 bytes starts with the number 8 followed by 8 bytes of data and ends with the number 8.
- TODO: complete header description
Constructor & Destructor Documentation
BALL::DCDFile::DCDFile |
( |
|
) |
|
virtual BALL::DCDFile::~DCDFile |
( |
|
) |
[virtual] |
Member Function Documentation
virtual bool BALL::DCDFile::append |
( |
const SnapShot & |
snapshot |
) |
[virtual] |
Append a SnapShot to an existing file. Note that this method does not update the header.
- Parameters:
-
| snapshot | the snapshot we want to save |
- Returns:
- true, if writing was successful
Reimplemented from BALL::TrajectoryFile.
virtual void BALL::DCDFile::clear |
( |
|
) |
[virtual] |
void BALL::DCDFile::disableVelocityStorage |
( |
|
) |
|
void BALL::DCDFile::enableVelocityStorage |
( |
|
) |
|
Write several SnapShots to disk.
- Parameters:
-
| buffer | a vector of snapshots |
- Returns:
- true, if flushing was successful, false ow.
Reimplemented from BALL::TrajectoryFile.
bool BALL::DCDFile::hasVelocities |
( |
|
) |
const |
bool BALL::DCDFile::init |
( |
|
) |
|
Initialize this instance, i. e. read the header and update members
bool BALL::DCDFile::isSwappingBytes |
( |
|
) |
const |
bool BALL::DCDFile::operator== |
( |
const DCDFile & |
file |
) |
const |
virtual bool BALL::DCDFile::read |
( |
SnapShot & |
snapshot |
) |
[virtual] |
Read the next snapshot from the file
- Parameters:
-
| snapshot | a buffer for result delivery |
- Returns:
- true, if a snapshot could be read, false ow.
Reimplemented from BALL::TrajectoryFile.
float BALL::DCDFile::readFloat_ |
( |
|
) |
[protected] |
virtual bool BALL::DCDFile::readHeader |
( |
|
) |
[virtual] |
Read the header of an existing file. Return true if the header could be read successfully, false ow.
Reimplemented from BALL::TrajectoryFile.
bool BALL::DCDFile::readSize_ |
( |
Size |
expected_size, |
|
|
const String & |
what | |
|
) |
| | [protected] |
Size BALL::DCDFile::readSize_ |
( |
|
) |
[protected] |
bool BALL::DCDFile::readVector_ |
( |
vector< Vector3 > & |
v |
) |
[protected] |
virtual bool BALL::DCDFile::seekAndWriteHeader |
( |
|
) |
[virtual] |
void BALL::DCDFile::writeFloat_ |
( |
const float & |
data |
) |
[inline, protected] |
virtual bool BALL::DCDFile::writeHeader |
( |
|
) |
[virtual] |
Write a header Return true if the header could be written successfully, false ow.
Reimplemented from BALL::TrajectoryFile.
void BALL::DCDFile::writeSize_ |
( |
const Size & |
data |
) |
[inline, protected] |
void BALL::DCDFile::writeVector_ |
( |
const vector< Vector3 > & |
v |
) |
[protected] |
Member Data Documentation