Format
classes¶This classe only define the interface, which as to be implemented by all formats.
chemfiles::Format
Abstract base class for formats reader and writer
Public Type
Public Functions
Format
(File & f)Constructor associating a file to this Format instance. The file should have the file_t class.
read_step
(const size_t step, Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
step
- The step to read
frame
- The frame to fill
read
(Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
frame
- The frame to fill
write
(const Frame & frame)Write a step (frame) to the associated file.
This function can throw an exception in case of error.
frame
- The frame to be writen
nsteps
() const = 0Get the number of frames in the associated file.
description
() const = 0A short string describing the format.
These classes implement the interface defined previously.
chemfiles::XYZFormat
XYZ file format reader.
The format is described at http://openbabel.org/wiki/XYZ
Public Functions
read_step
(const size_t step, Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
step
- The step to read
frame
- The frame to fill
read
(Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
frame
- The frame to fill
write
(const Frame & frame)Write a step (frame) to the associated file.
This function can throw an exception in case of error.
frame
- The frame to be writen
description
() constA short string describing the format.
nsteps
() constGet the number of frames in the associated file.
chemfiles::NCFormat
Amber NetCDF file format reader.
http://ambermd.org/netcdf/nctraj.xhtml
Public Functions
read_step
(const size_t step, Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
step
- The step to read
frame
- The frame to fill
read
(Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
frame
- The frame to fill
write
(const Frame & frame)Write a step (frame) to the associated file.
This function can throw an exception in case of error.
frame
- The frame to be writen
nsteps
() constGet the number of frames in the associated file.
description
() constA short string describing the format.
chemfiles::Molfile
Use of VMD Molfile plugins as format reader/writer. This class is templated by a value in the MolfileFormat enum.
Public Functions
read
(Frame & frame)Read a specific step from the associated file.
This function can throw an exception in case of error.
frame
- The frame to fill
description
() constA short string describing the format.
nsteps
() constGet the number of frames in the associated file.
List all the VMD molfile plugins enabled. For more documentation about VMD molfile plugins, please see: http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/
Values:
PDB
- PDB file format.
DCD
- DCD binary file format.
GRO
- Gromacs .gro file format.
TRR
- Gromacs .trr file format.
XTC
- Gromacs .xtc file format.
TRJ
- Gromacs .trj file format.