Gromacs  2025-dev-20241003-bd59e46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::OutputSelector Class Reference

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

+ Inheritance diagram for gmx::OutputSelector:
+ Collaboration diagram for gmx::OutputSelector:

Description

OutputSelector class controls setting which coordinates are actually written.

This adapter selects a subset of the particles and their data for output. The subset is specified via a selection object (see Parsing and Evaluation of Analysis Selections (selection)). The corresponding particle data (coordinates, velocities, forces) and topology information is copied from as available from the input data.

Public Member Functions

 OutputSelector (const Selection &sel)
 Construct OutputSelector object with initial selection. More...
 
 OutputSelector (OutputSelector &&old) noexcept=default
 Move assignment constructor for OutputSelector.
 
void processFrame (int, t_trxframe *input) override
 Change coordinate frame information for output. More...
 
void checkAbilityDependencies (unsigned long) 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.
 
 GMX_DISALLOW_COPY_AND_ASSIGN (IOutputAdapter)
 

Constructor & Destructor Documentation

gmx::OutputSelector::OutputSelector ( const Selection sel)
inlineexplicit

Construct OutputSelector object with initial selection.

Can be used to initialize OutputSelector from outside of trajectoryanalysis framework.

Member Function Documentation

void gmx::OutputSelector::checkAbilityDependencies ( unsigned  abilities) const
inlineoverridevirtual

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

Change coordinate frame information for output.

Takes the previously internally stored coordinates and saves them again. Applies correct number of atoms in this case.

Parameters
[in]inputCoordinate frame to be modified later.

Implements gmx::IOutputAdapter.


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