Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::IMdpOptionProvider Class Referenceabstract

#include <gromacs/mdtypes/imdpoptionprovider.h>

+ Inheritance diagram for gmx::IMdpOptionProvider:


Interface for handling mdp/tpr input to a mdrun module.

This interface provides a mechanism for modules to contribute data that traditionally has been kept in t_inputrec. This is essentially parameters read from an mdp file and subsequently stored in a tpr file.

The main method to implement is initMdpOptions(). This declares a set of options in nested sections. When declaring options, the module defines its own internal variables where the values will be stored (see Extensible Handling of Options (options) for an overview). The section structure for the options also defines an internal data representation in the form of a generic key-value tree. This is used to store the values in the tpr file, and also for broadcasting, gmx dump, and gmx check.

Implementation of initMdpTransform() is required for populating the options from the current flat mdp format. It specifies how the mdp parameters map into the options structure/internal key-value tree specified in initMdpOptions().

See mdrun modules for more details on how mdp parsing and related functionality works with this interface.

Public Member Functions

virtual void initMdpTransform (IKeyValueTreeTransformRules *transform)=0
 Initializes a transform from mdp values to sectioned options. More...
virtual void initMdpOptions (IOptionsContainerWithSections *options)=0
 Initializes options that declare input (mdp) parameters for this module.
virtual void buildMdpOutput (KeyValueTreeObjectBuilder *builder) const =0
 Prepares to write a flat key-value tree like an mdp file.

Member Function Documentation

virtual void gmx::IMdpOptionProvider::initMdpTransform ( IKeyValueTreeTransformRules transform)
pure virtual

Initializes a transform from mdp values to sectioned options.

The transform is specified from a flat KeyValueTreeObject that contains each mdp value as a property, to a structured key-value tree that should match the options defined in initMdpOptions().

This method may be removed once the flat mdp file is replaced with a more structure input file (that can be directly read into the internal key-value tree), and there is no longer any need for backward compatibility with old files.

Implemented in gmx::anonymous_namespace{electricfield.cpp}::ElectricField, and gmx::DensityFittingOptions.

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