xmol::io::AmberNetCDF class

AMBER NetCDF Trajectory

Format description: https://ambermd.org/netcdf/nctraj.xhtml

Base classes

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

Constructors, destructors, conversion operators

AmberNetCDF(const AmberNetCDF&) deleted
AmberNetCDF(AmberNetCDF&&) defaulted
AmberNetCDF(std::string filename) explicit
~AmberNetCDF()

Public functions

auto operator=(const AmberNetCDF&) -> AmberNetCDF& deleted
auto operator=(AmberNetCDF&&) -> AmberNetCDF& defaulted
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
auto has_cell() const -> bool

Function documentation

void xmol::io::AmberNetCDF::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::AmberNetCDF::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()