Gromacs  2023.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Attributes
gmx::MDModulesNotifiers Struct Reference

#include <gromacs/mdrunutility/mdmodulesnotifiers.h>


Group of notifers to organize that MDModules can receive callbacks they subscribe to.

MDModules use members of this struct to subscribe to notifications of particular events. When the event occurs, the callback provided by a particular MDModule will be passed a parameter of the particular type they are interested in.

Typically, during the setup phase, modules subscribe to notifiers that interest them by passing callbacks that expect a single parameter that describes the event. These are stored for later use. See the sequence diagram that follows:


When the event occurs later on, the stored callbacks are used to allow the modules to react. See the following sequence diagram, which assumes that exampleNotifier was configured as in the previous sequence diagram.


The template arguments to the members of this struct are the parameters passed to the callback functions, one type per callback. Arguments passed as pointers are always meant to be modified, but never meant to be stored (in line with the policy everywhere else).

Public Attributes

BuildMDModulesNotifier< const
&, const MDLogger
&, WarningHandler
*, EnergyCalculationFrequencyErrors
*, gmx_mtop_t *, const
&, KeyValueTreeObjectBuilder,
const QMInputFileName & >
 Pre-processing callback functions. CoordinatesAndBoxPreprocessed Allows modules to access coordinates, box and pbc during grompp MDLogger Allows MdModule to use standard logging class for messages output warninp* Allows modules to make grompp warnings, notes and errors EnergyCalculationFrequencyErrors* allows modules to check if they match their required calculation frequency and add their error message if needed to the collected error messages gmx_mtop_t* Allows modules to modify the topology during pre-processing IndexGroupsAndNames provides modules with atom indices and their names KeyValueTreeObjectBuilder enables writing of module internal data to .tpr files. QMInputFileName Allows QMMM module to know if user provided external QM input file.
< MDModulesCheckpointReadingDataOnMain,
MDModulesWriteCheckpointData >
 Handles subscribing and calling checkpointing callback functions. More...
BuildMDModulesNotifier< const
&, LocalAtomSetManager
*, const MDLogger &, const
&, MDModulesEnergyOutputToDensityFittingRequestChecker
*, MDModulesEnergyOutputToQMMMRequestChecker
*, SeparatePmeRanksPermitted
*, const PbcType &, const
SimulationTimeStep &, const
t_commrec &, const
MdRunInputFilename & >::type 
 Handles subscribing and calling callbacks during simulation setup. More...

Member Data Documentation

BuildMDModulesNotifier<MDModulesCheckpointReadingDataOnMain, MDModulesCheckpointReadingBroadcast, MDModulesWriteCheckpointData>::type gmx::MDModulesNotifiers::checkpointingNotifier_

Handles subscribing and calling checkpointing callback functions.

MDModulesCheckpointReadingDataOnMain provides modules with their checkpointed data on the main node and checkpoint file version MDModulesCheckpointReadingBroadcast provides modules with a communicator and the checkpoint file version to distribute their data MDModulesWriteCheckpointData provides the modules with a key-value-tree builder to store their checkpoint data and the checkpoint file version

BuildMDModulesNotifier<const KeyValueTreeObject&, LocalAtomSetManager*, const MDLogger&, const gmx_mtop_t&, MDModulesEnergyOutputToDensityFittingRequestChecker*, MDModulesEnergyOutputToQMMMRequestChecker*, SeparatePmeRanksPermitted*, const PbcType&, const SimulationTimeStep&, const t_commrec&, const MdRunInputFilename&>::type gmx::MDModulesNotifiers::simulationSetupNotifier_

Handles subscribing and calling callbacks during simulation setup.

const KeyValueTreeObject& provides modules with the internal data they wrote to .tpr files LocalAtomSetManager* enables modules to add atom indices to local atom sets to be managed const MDLogger& Allows MdModule to use standard logging class for messages output const gmx_mtop_t& provides the topology of the system to the modules MDModulesEnergyOutputToDensityFittingRequestChecker* enables modules to report if they want to write their energy output to the density fitting field in the energy files MDModulesEnergyOutputToQMMMRequestChecker* enables QMMM module to report if it want to write their energy output to the "Quantum En." field in the energy files SeparatePmeRanksPermitted* enables modules to report if they want to disable dedicated PME ranks const PbcType& provides modules with the periodic boundary condition type that is used during the simulation const SimulationTimeStep& provides modules with the simulation time-step that allows them to interconvert between step time information const t_commrec& provides a communicator to the modules during simulation setup const MdRunInputFilename& Allows modules to know .tpr filename during mdrun

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