Gromacs
2024.4
|
Interface class for frame handling, provides handles for all calls.
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.
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.
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.
If additional methods are needed to perform modification of coordinate data, new FrameConverters can be written that again implement the IFrameConverter interface. The new method should follow the approach of the other modules that are present in performing single modifications on the coordinates.
Classes | |
class | gmx::IFrameConverter |
IFrameConverter interface for manipulating coordinate information. More... | |
Typedefs | |
using | gmx::FrameConverterPointer = std::unique_ptr< IFrameConverter > |
Typedef to have direct access to the individual FrameConverter modules. | |