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

#include <gromacs/coordinateio/outputadapters/setprecision.h>

+ Inheritance diagram for gmx::SetPrecision:
+ Collaboration diagram for gmx::SetPrecision:

Description

SetPrecision class allows changing file writing precision.

This class allows the user to define the precision for writing coordinate data to output files.

Public Member Functions

 SetPrecision (int precision)
 Construct SetPrecision object with user defined value. More...
 
 SetPrecision (SetPrecision &&old) noexcept=default
 Move constructor for SetPrecision.
 
void processFrame (int, t_trxframe *input) override
 Change t_trxframe according to user input. More...
 
void checkAbilityDependencies (unsigned long abilities) const override
 Checks that the abilities of the output writer are sufficient for this adapter. More...
 
- Public Member Functions inherited from gmx::IOutputAdapter
 IOutputAdapter ()
 Default constructor for IOutputAdapter interface.
 
 IOutputAdapter (IOutputAdapter &&old) noexcept=default
 Move constructor for old object.
 

Constructor & Destructor Documentation

gmx::SetPrecision::SetPrecision ( int  precision)
inlineexplicit

Construct SetPrecision object with user defined value.

Can be used to initialize SetPrecision from outside of trajectoryanalysis with the user specified option to change precision or not.

Parameters
[in]precisionUser defined value for output precision in file types that support it.

Member Function Documentation

void gmx::SetPrecision::checkAbilityDependencies ( unsigned long  abilities) const
overridevirtual

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.

Implements gmx::IOutputAdapter.

void gmx::SetPrecision::processFrame ( int  framenumber,
t_trxframe *  input 
)
overridevirtual

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.

Implements gmx::IOutputAdapter.


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