Gromacs
2024.4
|
#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... | |
Friends | |
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. More... | |
void gmx::TrajectoryFrameWriter::prepareAndWriteFrame | ( | int | framenumber, |
const t_trxframe & | input | ||
) |
Writes the input frame, after applying any IOutputAdapters.
[in] | framenumber | Number of frame being currently processed. |
[in] | input | View of the constant t_trxframe object provided by the method that calls the output manager. |
|
friend |
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] | top | Pointer to full topology or null. |
[in] | sel | Reference to global selection used to construct the object. |
[in] | filename | Name of new output file, used to deduce file type. |
[in] | atoms | Smart Pointer to atoms data or null. |
[in] | requirements | Container for settings obtained to specify which OutputAdapters should be registered. |
InconsistentInputError | When user input and requirements don't match. |