Add notifications for MDModules that will be used in QMMM
[alexxy/gromacs.git] / src / gromacs / mdrun / runner.cpp
index 20c0c3e136ce036e67b3a38f57125d3bb83a1791..0fdd4d8f7cdcb17f5d7a72dc77bb3068861b41ff 100644 (file)
@@ -1059,11 +1059,21 @@ int Mdrunner::mdrunner()
     mdModules_->subscribeToSimulationSetupNotifications();
     const auto& setupNotifier = mdModules_->notifiers().simulationSetupNotifier_;
 
+    // Notify MdModules of existing logger
+    setupNotifier.notify(mdlog);
+
+    // Notify MdModules of internal parameters, saved into KVT
     if (inputrec->internalParameters != nullptr)
     {
         setupNotifier.notify(*inputrec->internalParameters);
     }
 
+    // Let MdModules know the .tpr filename
+    {
+        gmx::MdRunInputFilename mdRunInputFilename = { ftp2fn(efTPR, filenames.size(), filenames.data()) };
+        setupNotifier.notify(mdRunInputFilename);
+    }
+
     if (fplog != nullptr)
     {
         pr_inputrec(fplog, 0, "Input Parameters", inputrec.get(), FALSE);