Gromacs  2021.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::TrajectoryFrameWriter Class Reference

#include <gromacs/coordinateio/coordinatefile.h>


Writes coordinate frames to a sink, e.g. a trajectory file.

Writes all frames passed to the trajectory file handle it manages. It can use IOutputAdapter modules to transform the frame data before writing. If any transform modules are used, makes a deep copy of the frame contents.

Public Member Functions

void prepareAndWriteFrame (int framenumber, const t_trxframe &input)
 Writes the input frame, after applying any IOutputAdapters. More...


< TrajectoryFrameWriter
createTrajectoryFrameWriter (const gmx_mtop_t *top, const Selection &sel, const std::string &filename, AtomsDataPtr atoms, OutputRequirements requirements)
 Factory function for TrajectoryFrameWriter. More...

Member Function Documentation

void gmx::TrajectoryFrameWriter::prepareAndWriteFrame ( int  framenumber,
const t_trxframe &  input 

Writes the input frame, after applying any IOutputAdapters.

[in]framenumberNumber of frame being currently processed.
[in]inputView of the constant t_trxframe object provided by the method that calls the output manager.

Friends And Related Function Documentation

std::unique_ptr<TrajectoryFrameWriter> createTrajectoryFrameWriter ( const gmx_mtop_t *  top,
const Selection sel,
const std::string &  filename,
AtomsDataPtr  atoms,
OutputRequirements  requirements 

Factory function for TrajectoryFrameWriter.

Used to initialize a new instance of TrajectoryFrameWriter with the user supplied information for writing trajectory data to disk. Information needed is the file type, file name corresponding to the type, if available topology information and selection information.

If supplied, the modules contained within adapters are registered on the TrajectoryFrameWriter if possible.

The factory function is responsible for the initial santity checks concerning file types and availability of topology information, with the registration of modules being the second part.

[in]topPointer to full topology or null.
[in]selReference to global selection used to construct the object.
[in]filenameName of new output file, used to deduce file type.
[in]atomsSmart Pointer to atoms data or null.
[in]requirementsContainer for settings obtained to specify which OutputAdapters should be registered.
InconsistentInputErrorWhen user input and requirements don't match.

The documentation for this class was generated from the following files: