From: Hubert Santuz Date: Fri, 29 Jan 2021 18:08:25 +0000 (+0000) Subject: Allow MdModules to access the topology during simulation setup. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=d78c9efb838d5881c0d420f8d2bb0506687cb41e;p=alexxy%2Fgromacs.git Allow MdModules to access the topology during simulation setup. --- diff --git a/src/gromacs/mdrun/runner.cpp b/src/gromacs/mdrun/runner.cpp index 8ce13dfff4..46fd7ad5ff 100644 --- a/src/gromacs/mdrun/runner.cpp +++ b/src/gromacs/mdrun/runner.cpp @@ -1580,6 +1580,7 @@ int Mdrunner::mdrunner() { mdModulesNotifier.notify(*cr); mdModulesNotifier.notify(&atomSets); + mdModulesNotifier.notify(mtop); mdModulesNotifier.notify(inputrec->pbcType); mdModulesNotifier.notify(SimulationTimeStep{ inputrec->delta_t }); /* Initiate forcerecord */ diff --git a/src/gromacs/utility/mdmodulenotification.h b/src/gromacs/utility/mdmodulenotification.h index 8854152fe6..aa30111cfd 100644 --- a/src/gromacs/utility/mdmodulenotification.h +++ b/src/gromacs/utility/mdmodulenotification.h @@ -50,6 +50,7 @@ #include "gromacs/utility/mdmodulenotification-impl.h" struct t_commrec; +struct gmx_mtop_t; enum class PbcType : int; namespace gmx @@ -198,6 +199,7 @@ struct MdModulesNotifier * wrote to .tpr files * LocalAtomSetManager* enables modules to add atom indices to local atom sets * to be managed + * 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 @@ -213,6 +215,7 @@ struct MdModulesNotifier */ registerMdModuleNotification