|
faunus
|
Writes frames into an XTC file (GROMACS compressed trajectory file format). More...
#include <io.h>
Public Member Functions | |
| XTCWriter (const std::string &filename) | |
| void | write (const TrajectoryFrame &frame) |
| Writes a frame into the file. More... | |
| void | writeNext (const TrajectoryFrame &frame) |
| Writes a next frame into the file using own automatic counter for step and timestamp. More... | |
| template<RequirePointIterator begin_iterator, typename end_iterator > | |
| void | writeNext (const Point &box, begin_iterator coordinates_begin, end_iterator coordinates_end) |
| Writes a next frame into the file using own automatic counter for step and timestamp. More... | |
Public Attributes | |
| const std::string | filename |
| name of the trajectory file, mainly for error reporting | |
Protected Member Functions | |
| void | writeFrame () |
| Actual wrapper around C function that writes the current frame into xtc_frame. More... | |
| void | writeFrameAt (int step, float time) |
| Actual wrapper around C function that writes the current frame into xtc_frame overriding step and timestamp. More... | |
Writes frames into an XTC file (GROMACS compressed trajectory file format).
It is a wrapper around C function calls.
The frames can be provided as a TrajectoryFrame structure or as a list of positions in an input iterator. The class is responsible for I/O operations, not data conversion.
|
explicit |
| filename | a name of the XTC file to open |
| void Faunus::XTCWriter::write | ( | const TrajectoryFrame & | frame | ) |
Writes a frame into the file.
| [in] | frame | frame to be written |
| std::runtime_error | when other I/O error occures |
|
protected |
Actual wrapper around C function that writes the current frame into xtc_frame.
| std::runtime_error | when other I/O error occures |
|
protected |
Actual wrapper around C function that writes the current frame into xtc_frame overriding step and timestamp.
| std::runtime_error | when other I/O error occures |
| void Faunus::XTCWriter::writeNext | ( | const TrajectoryFrame & | frame | ) |
Writes a next frame into the file using own automatic counter for step and timestamp.
The corresponding values in the frame are ignored.
| [in] | frame | frame to be written |
| std::runtime_error | when other I/O error occures |
|
inline |
Writes a next frame into the file using own automatic counter for step and timestamp.
| begin_iterator | |
| end_iterator |
| [in] | box | dimensions of the cubic box (xyz) |
| [in] | coordinates_begin | input iterator with coordinates (not particles) |
| [in] | coordinates_end | input iterator's end |
1.8.13