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::ProcessFrameConversion Class Reference

#include <gromacs/coordinateio/frameconverters/register.h>

+ Inheritance diagram for gmx::ProcessFrameConversion:
+ Collaboration diagram for gmx::ProcessFrameConversion:

Description

ProcessFrameConversion class for handling the running of several analysis steps.

This analysis module allows to register modules for coordinate frame manipulation that are then run once this modules convertFrame method is invoked. If modules are registered here, the method will take care of memory management to ensure that input data is not modified.

It is possible to chain different versions of this class together to have several independend containers. In this case, only the outermost container will usually own the memory, but it is possible to envision different implementations that take advantage of the indivudal memory owning objects.

Public Member Functions

 ProcessFrameConversion ()
 Default constructor for ProcessFrameConversion.
 
 ~ProcessFrameConversion () override
 Default destructor for ProcessFrameConversion.
 
void convertFrame (t_trxframe *input) override
 Change coordinate frame information for output. More...
 
unsigned long guarantee () const override
 Guarantees provided by this method and all included ones.
 
void addAndCheckGuarantee (unsigned long guarantee)
 Add new guarantee and check if it invalidates previous one. More...
 
void addFrameConverter (FrameConverterPointer module)
 Add framemodule to analysis chain. More...
 
int getNumberOfConverters () const
 Get number of converters registered.
 
t_trxframe * prepareAndTransformCoordinates (const t_trxframe *inputFrame)
 Wrapper method that allows input of a const inputFrame. More...
 
- Public Member Functions inherited from gmx::IFrameConverter
 IFrameConverter (IFrameConverter &&old) noexcept=default
 Move constructor for old object.
 

Member Function Documentation

void gmx::ProcessFrameConversion::addAndCheckGuarantee ( unsigned long  guarantee)

Add new guarantee and check if it invalidates previous one.

Parameters
[in]guaranteeNew guarantee provided by frameconverter to add.
void gmx::ProcessFrameConversion::addFrameConverter ( FrameConverterPointer  module)

Add framemodule to analysis chain.

Other modules derived from IFrameConverter can be registered to be analysed by this method instead of having to be analysed separately.

Parameters
[in]moduleFrameConverter module to add to the chain.
Exceptions
unspecifiedAny exception thrown by any of the module objects in the chain during analysis.
void gmx::ProcessFrameConversion::convertFrame ( t_trxframe *  input)
overridevirtual

Change coordinate frame information for output.

This method is used to perform the actual coordinate frame manipulation. In this case, it acts as a wrapper that runs the method for all modules that have been registered for the analysis chain.

Parameters
[in,out]inputCoordinate frame to be modified n process chain.

Implements gmx::IFrameConverter.

t_trxframe * gmx::ProcessFrameConversion::prepareAndTransformCoordinates ( const t_trxframe *  inputFrame)

Wrapper method that allows input of a const inputFrame.

Takes care of preparing a memory owning object that will contain the final coordinates after all modifcations have been applied. As long as this module exists, the memory and the containing object is valid.

Parameters
[in]inputFrameCoordinate data input.
Returns
None owning pointer to new coordinates.

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