Gromacs  2023.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs
iframeconverter.h File Reference
#include <memory>
#include "frameconverterenums.h"
+ Include dependency graph for iframeconverter.h:
+ This graph shows which files directly or indirectly include this file:


Interface class for frame handling, provides handles for all calls.

Overview of coordinate modification (coordinate converter) routines

The methods based on the IFrameConverter interface provide ways to change the coordinates found in input files according to a user or program specified pattern that fulfils a specified requirement. The basic adapter implements a single method that performs one operation on a coordinate file, which provides a guarantee on the produced coordinates. Those guarantees should be simple enough so that they can be fulfilled by the single operation, and avoid complex invocation patterns.

Combination of different frame converters

Several individual converters can be combined and executed in sequence to provide more complex operations. Here, each individual converter can provide part of a complex guarantee requested for the final output structure, depending on the combination and sequence of the adapters. Implementers need to take care to consider if an adapter added to a particular sequence will invalidate a previous guarantee, to make sure there is a way to avoid operations unknowingly invalidating each other.

Data handling for frame conversion methods

Methods that use the IFrameConverter based registration and chaining method do not need handle their own data. The registration method provides data storage for the modified coordinates and returns a final, modified t_trxframe datastructure with the method owned coordinates. No changes are applied to the velocity and force fields (if present), with eventually present data used in the new datastructure.

Methods that implement single converters without the registration machinery need to implement their own memory handling.


Each class implemented on top of the IFrameConverter interface implements each own convertFrame method that performs its operation on the coordinates in the t_trxframe input. As well as this, the method should report which kind of guarantee is provided by the method, as reported by the guarantee method.

Paul Bauer


class  gmx::IFrameConverter
 IFrameConverter interface for manipulating coordinate information. More...


using gmx::FrameConverterPointer = std::unique_ptr< IFrameConverter >
 Typedef to have direct access to the individual FrameConverter modules.