Gromacs  2025-dev-20240718-982dfdc
 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>

+ Collaboration diagram for gmx::MDModulesNotifiers:


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 &, const
EnsembleTemperature & >::type 
 Pre-processing callback functions. More...
< MDModulesCheckpointReadingDataOnMain,
MDModulesWriteCheckpointData >
 Handles subscribing and calling checkpointing callback functions. More...
BuildMDModulesNotifier< const
&, LocalAtomSetManager
*, const MDLogger &, const
gmx_mtop_t &, const
*, MDModulesEnergyOutputToQMMMRequestChecker
*, SeparatePmeRanksPermitted
*, const PbcType &, const
SimulationTimeStep &, const
t_commrec &, const
MdRunInputFilename &, const
EdrOutputFilename & >::type 
 Handles subscribing and calling callbacks during simulation setup. More...

Member Data Documentation

Handles subscribing and calling checkpointing callback functions.

Template Parameters
MDModulesCheckpointReadingDataOnMainProvides modules with their checkpointed data on the main node and checkpoint file version
MDModulesCheckpointReadingBroadcastProvides modules with a communicator and the checkpoint file version to distribute their data
MDModulesWriteCheckpointDataProvides the modules with a key-value-tree builder to store their checkpoint data and the checkpoint file version
BuildMDModulesNotifier<const CoordinatesAndBoxPreprocessed&, const MDLogger&, WarningHandler*, EnergyCalculationFrequencyErrors*, gmx_mtop_t*, const IndexGroupsAndNames&, KeyValueTreeObjectBuilder, const QMInputFileName&, const EnsembleTemperature&>::type gmx::MDModulesNotifiers::preProcessingNotifier_

Pre-processing callback functions.

Template Parameters
CoordinatesAndBoxPreprocessedAllows modules to access coordinates, box and PBC during grompp
MDLoggerAllows MdModule to use standard logging class for output of messages
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
IndexGroupsAndNamesProvides modules with atom indices and their names
KeyValueTreeObjectBuilderEnables writing of module internal data to .tpr files.
QMInputFileNameAllows the QMMM module to know if the user has provided an external QM input file
EnsembleTemperatureProvides modules with the constant ensemble temperature.
BuildMDModulesNotifier<const KeyValueTreeObject&, LocalAtomSetManager*, const MDLogger&, const gmx_mtop_t&, const MDModulesAtomsRedistributedSignal, MDModulesEnergyOutputToDensityFittingRequestChecker*, MDModulesEnergyOutputToQMMMRequestChecker*, SeparatePmeRanksPermitted*, const PbcType&, const SimulationTimeStep&, const t_commrec&, const MdRunInputFilename&, const EdrOutputFilename&>::type gmx::MDModulesNotifiers::simulationSetupNotifier_

Handles subscribing and calling callbacks during simulation setup.

Template Parameters
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
MDLogger&Allows MdModule to use standard logging class for messages output
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 wants to write its energy output to the "Quantum En." field in the energy files
SeparatePmeRanksPermitted*Enables modules to report if they want to disable dedicated PME ranks
PbcType&Provides modules with the periodic boundary condition type that is used during the simulation
SimulationTimeStep&Provides modules with the simulation time-step that allows them to interconvert between step and time information
t_commrec&Provides a communicator to the modules during simulation setup
MdRunInputFilename&Allows modules to know .tpr filename during mdrun
EdrOutputFilename&Allows modules to know .edr filename during mdrun

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