Gromacs
2025-dev-20241003-bd59e46
|
#include <gromacs/coordinateio/frameconverters/register.h>
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. | |
void gmx::ProcessFrameConversion::addAndCheckGuarantee | ( | unsigned long | guarantee | ) |
Add new guarantee and check if it invalidates previous one.
[in] | guarantee | New 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.
[in] | module | FrameConverter module to add to the chain. |
unspecified | Any exception thrown by any of the module objects in the chain during analysis. |
|
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.
[in,out] | input | Coordinate 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.
[in] | inputFrame | Coordinate data input. |