Gromacs
2026.0-dev-20241204-d69d709
|
#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).
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 CoordinatesAndBoxPreprocessed&, const MDLogger&, WarningHandler*, EnergyCalculationFrequencyErrors*, gmx_mtop_t*, const IndexGroupsAndNames&, KeyValueTreeObjectBuilder, const QMInputFileName&, const EnsembleTemperature&>::type gmx::MDModulesNotifiers::preProcessingNotifier_ |
Pre-processing callback functions.
CoordinatesAndBoxPreprocessed | Allows modules to access coordinates, box and PBC during grompp |
MDLogger | Allows 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 |
IndexGroupsAndNames | Provides modules with atom indices and their names |
KeyValueTreeObjectBuilder | Enables writing of module internal data to .tpr files. |
QMInputFileName | Allows the QMMM module to know if the user has provided an external QM input file |
EnsembleTemperature | Provides modules with the constant ensemble temperature. |
BuildMDModulesNotifier<const KeyValueTreeObject&, LocalAtomSetManager*, const StartingBehavior&, const MDLogger&, const gmx_mtop_t&, const MDModulesAtomsRedistributedSignal, MDModulesEnergyOutputToDensityFittingRequestChecker*, MDModulesEnergyOutputToQMMMRequestChecker*, SeparatePmeRanksPermitted*, const PbcType&, const SimulationTimeStep&, const EnsembleTemperature&, const t_commrec&, const gmx_multisim_t*, const MdRunInputFilename&, const EdrOutputFilename&, const PlumedInputFilename&>::type gmx::MDModulesNotifiers::simulationSetupNotifier_ |
Handles subscribing and calling callbacks during simulation setup.
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 |
StartingBehavio& | Provides modules with the starting behavior of the simulation |
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 |
EnsembleTemperature& | Provides modules with the (eventual) constant ensemble temperature |
t_commrec& | Provides a communicator to the modules during simulation setup |
gmx_multisim_t& | Shares the multisim struct with the modules Subscribing to this notifier will sync checkpointing of simulations and will cause simulations to stop, due to signals or exceededing maximum time, at the same step. This ensures that the output and checkpoints of ensemble simulations are consistent and that ensemble simulations can be continued. |
MdRunInputFilename& | Allows modules to know .tpr filename during mdrun |
EdrOutputFilename& | Allows modules to know .edr filename during mdrun |
PlumedInputFilename& | Allows modules to know the optional .dat filename to be read by plumed |