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

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

+ Inheritance diagram for gmx::SetVelocities:
+ Collaboration diagram for gmx::SetVelocities:

Description

SetVelocities class allows changing writing of velocities to file.

This class allows the user to define if velocities should be written to the output coordinate file, and checks if they are available from the currently processed data.

Public Member Functions

 SetVelocities (ChangeSettingType velocity)
 Construct SetVelocities object with choice for boolean value. More...
 
 SetVelocities (SetVelocities &&old) noexcept=default
 Move constructor for SetVelocities.
 
void processFrame (int, t_trxframe *input) override
 Change coordinate frame information for output. 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::SetVelocities::SetVelocities ( ChangeSettingType  velocity)
inlineexplicit

Construct SetVelocities object with choice for boolean value.

Can be used to initialize SetVelocities from outside of trajectoryanalysis with the user specified option to write coordinate velocities or not.

Member Function Documentation

void gmx::SetVelocities::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::SetVelocities::processFrame ( int  ,
t_trxframe *  input 
)
overridevirtual

Change coordinate frame information for output.

In this case, the correct flag for writing the velocities is applied to the output frame, depending on user selection and availability in the input data.

Parameters
[in]inputCoordinate frame to be modified later.

Implements gmx::IOutputAdapter.


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