|
BALL
1.4.2
|
#include <BALL/FORMAT/TRRFile.h>
Classes | |
| class | TRRHeader |
Public Member Functions | |
Constructors and Destructor | |
| TRRFile () | |
| Default constructor. More... | |
| TRRFile (const String &name, File::OpenMode open_mode=std::ios::in) | |
| Construct and open a file. More... | |
| virtual | ~TRRFile () |
| Destructor. More... | |
Assignment | |
| virtual void | clear () |
| Clear method. More... | |
Predicates | |
| bool | operator== (const TRRFile &file) const |
| Equality operator. More... | |
Public methods for file handling | |
| virtual bool | init () |
| Initialize the file for usage. More... | |
| virtual bool | readHeader () |
| virtual bool | writeNextHeader (const TRRHeader &header) |
| virtual bool | readNextHeader (TRRHeader &header) |
| virtual bool | append (const SnapShot &snapshot) |
| virtual bool | read (SnapShot &snapshot) |
| virtual bool | skipFrame () |
| virtual Size | getNumberOfSnapShots () |
| virtual TRRFile & | operator>> (SnapShotManager &ssm) |
| Read the whole file into a SnapShotManager. More... | |
| virtual bool | flushToDisk (const std::vector< SnapShot > &buffer) |
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) |
Public Member Functions inherited from BALL::TrajectoryFile | |
| TrajectoryFile () | |
| Default constructor. More... | |
| TrajectoryFile (const String &filename, File::OpenMode open_mode=std::ios::in) | |
| virtual | ~TrajectoryFile () |
| Destructor. More... | |
| bool | operator== (const TrajectoryFile &file) const |
| Equality operator. More... | |
| Size | getNumberOfAtoms () const |
| virtual bool | writeHeader () |
Public Member Functions inherited from BALL::File | |
| File () | |
| File (const String &name, OpenMode open_mode=std::ios::in) | |
| virtual | ~File () |
| bool | isValid () const |
| bool | open (const String &name, File::OpenMode open_mode=std::ios::in) |
| bool | reopen () |
| bool | reopen (File::OpenMode open_mode) |
| void | close () |
| const String & | getName () const |
| void | setName (const String &name) |
| const String & | getOriginalName () const |
| Size | getSize () |
| File::OpenMode | getOpenMode () const |
| Type | getType (bool trace_link) const |
| bool | copyTo (const String &destination_name, Size buffer_size=4096) |
| bool | moveTo (const String &destination_name) |
| bool | remove () |
| bool | renameTo (const String &new_path) |
| bool | truncate (Size size=0) |
| std::fstream & | getFileStream () |
| TransformationManager & | getTransformationManager () |
| const TransformationManager & | getTransformationManager () const |
| bool | operator== (const File &file) const |
| bool | operator!= (const File &file) const |
| bool | isOpen () const |
| bool | isClosed () const |
| bool | isAccessible () const |
| bool | isCanonized () const |
| bool | isReadable () const |
| bool | isWritable () const |
| bool | isExecutable () const |
Static Public Attributes | |
| static const double | to_angstrom |
| static const double | to_nanometer |
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_ |
| Size | old_file_size_ |
Protected Attributes inherited from BALL::TrajectoryFile | |
| Size | number_of_snapshots_ |
| Size | number_of_atoms_ |
Protected Attributes inherited from BALL::File | |
| String | name_ |
| String | original_name_ |
| OpenMode | open_mode_ |
| bool | is_open_ |
| bool | is_temporary_ |
Private Member Functions | |
| const TRRFile & | operator= (const TRRFile &file) |
Additional Inherited Members | |
Public Types inherited from BALL::File | |
| typedef std::ios::openmode | OpenMode |
| enum | Transformation { TRANSFORMATION__EXEC = 1, TRANSFORMATION__FILTER = 2, TRANSFORMATION__URL = 3 } |
| enum | Type { TYPE__UNKNOWN = 0, TYPE__DIRECTORY = 1, TYPE__CHAR_SPECIAL_FILE = 2, TYPE__BLOCK_SPECIAL_FILE = 3, TYPE__REGULAR_FILE = 4, TYPE__SYMBOLIC_LINK = 5, TYPE__SOCKET = 6, TYPE__FIFO_SPECIAL_FILE = 7 } |
Static Public Member Functions inherited from BALL::File | |
| static Size | getSize (String name) |
| static Type | getType (String name, bool trace_link) |
| static bool | copy (String source_name, String destination_name, Size buffer_size=4096) |
| static bool | move (const String &source_name, const String &destination_name) |
| static bool | remove (String name) |
| static bool | rename (String old_path, String new_path) |
| static bool | truncate (String path, Size size=0) |
| static bool | createTemporaryFilename (String &temporary, const String &suffix=".TMP") |
| static void | enableTransformation (Transformation transformation) |
| static void | disableTransformation (Transformation transformation) |
| static bool | isTransformationEnabled (Transformation transformation) |
| static void | registerTransformation (const String &pattern, const String &exec) |
| static void | unregisterTransformation (const String &pattern) |
| static bool | isAccessible (String name) |
| static bool | isReadable (String name) |
| static bool | isWritable (String name) |
| static bool | isExecutable (String name) |
Static Protected Attributes inherited from BALL::File | |
| static HashSet< String > | created_temp_filenames_ |
| static TransformationManager | transformation_manager_ |
| static Size | transformation_methods_ |
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 String & | name, |
| File::OpenMode | open_mode = std::ios::in |
||
| ) |
Construct and open a file.
|
virtual |
Destructor.
Append a SnapShot to an existing file
| snapshot | the SnapShot we want to store |
Reimplemented from BALL::TrajectoryFile.
|
virtual |
Clear method.
Reimplemented from BALL::TrajectoryFile.
Flush the SnapShot buffer to disk.
| File::CannotWrite | if writing to the file failed |
Reimplemented from BALL::TrajectoryFile.
| Vector3 BALL::TRRFile::getBoundingBoxX | ( | ) | const |
| Vector3 BALL::TRRFile::getBoundingBoxY | ( | ) | const |
| Vector3 BALL::TRRFile::getBoundingBoxZ | ( | ) | const |
|
virtual |
get the number of snapshots stored in this instance.
Reimplemented from BALL::TrajectoryFile.
| Size BALL::TRRFile::getPrecision | ( | ) | const |
| float BALL::TRRFile::getTimestep | ( | ) | const |
| bool BALL::TRRFile::hasForces | ( | ) | const |
| bool BALL::TRRFile::hasVelocities | ( | ) | const |
|
virtual |
Initialize the file for usage.
|
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.
|
virtual |
Read file header This function is actually a nop, since TRRFiles don't have file headers; it is only provided for interface reasons.
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 | ) |
|
virtual |
Skip the next snapshot in the file
Writes the next header that shall preceed the next data block.
| header | the TRRHeader we want to write |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.3.1