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

#include <gromacs/coordinateio/ioutputadapter.h>

+ Inheritance diagram for gmx::IOutputAdapter:

Description

OutputAdapter class for handling trajectory file flag setting and processing.

This interface provides the base point upon which modules that modify trajectory frame datastructures should be build. The interface itself does not provide any direct means to modify the data, but only gives the virtual method to perform work on a t_trxframe object. Classes that modify trajectory frames should implement this interface.

Public Member Functions

 IOutputAdapter ()
 Default constructor for IOutputAdapter interface.
 
 IOutputAdapter (IOutputAdapter &&old) noexcept=default
 Move constructor for old object.
 
virtual void processFrame (int framenumber, t_trxframe *input)=0
 Change t_trxframe according to user input. More...
 
virtual void checkAbilityDependencies (unsigned long abilities) const =0
 Checks that the abilities of the output writer are sufficient for this adapter. More...
 

Member Function Documentation

virtual void gmx::IOutputAdapter::checkAbilityDependencies ( unsigned long  abilities) const
pure virtual

Checks that the abilities of the output writer are sufficient for this adapter.

It can happen that a method to write coordinate files does not match with a requested operation on the input data (e.g. the user requires velocities or forces to be written to a PDB file). To check those dependencies, derived classes need to implement a version of this function to make sure that only matching methods can be used.

Parameters
[in]abilitiesThe abilities of an output method that need to be checked against the dependencies created by using the derived method.
Exceptions
InconsistentInputErrorIf dependencies can not be matched to abilities.

Implemented in gmx::SetAtoms, gmx::SetForces, gmx::SetVelocities, gmx::OutputSelector, gmx::SetPrecision, gmx::SetBox, gmx::SetTimeStep, and gmx::SetStartTime.

virtual void gmx::IOutputAdapter::processFrame ( int  framenumber,
t_trxframe *  input 
)
pure virtual

Change t_trxframe according to user input.

Parameters
[in]framenumberFrame number as reported from the trajectoryanalysis framework or set by user.
[in,out]inputPointer to trajectory analysis frame that will be worked on.

Implemented in gmx::SetAtoms, gmx::SetForces, gmx::SetVelocities, gmx::OutputSelector, gmx::SetPrecision, gmx::SetTimeStep, gmx::SetBox, and gmx::SetStartTime.


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