xmol::io::GromacsXtcFile class

Gromacs .xtc input file.

Base classes

class xmol::trajectory::TrajectoryInputFile
Forward read-only re-enterable trajectory coordinate file.

Constructors, destructors, conversion operators

GromacsXtcFile(std::string filename, size_t n_frames) explicit

Public functions

auto n_frames() const -> size_t final
Number of frames.
auto n_atoms() const -> size_t final
Number of atoms per frame.
void read_frame(size_t index, Frame& frame) final
void advance(size_t shift) final

Function documentation

void xmol::io::GromacsXtcFile::read_frame(size_t index, Frame& frame) final

Read index 'th frame into coordinates

Note: trajectory without cell info should ignore cell argument. Precondition: index must match current position of internal data pointer

void xmol::io::GromacsXtcFile::advance(size_t shift) final

Advance internal data pointer by shift frames and be prepared to read coordinates

When internal data pointer shifted beyond n_frames() file handles must be closed

Note: advance(0) prepares file to be read by read_coordinates()