Add MTS support for pull and AWH
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / readir.cpp
index 270617bbab875c5e111fd4824cf9de5bfd6d3f9e..b2d504ca235afb9898c598bc6ee2da9fe8e81bf5 100644 (file)
@@ -311,6 +311,19 @@ static void setupMtsLevels(gmx::ArrayRef<gmx::MtsLevel> mtsLevels,
         {
             checkMtsRequirement(ir, "nstdhdl", ir.fepvals->nstdhdl, wi);
         }
+
+        if (ir.bPull)
+        {
+            const int pullMtsLevel = gmx::forceGroupMtsLevel(ir.mtsLevels, gmx::MtsForceGroups::Pull);
+            if (ir.pull->nstxout % ir.mtsLevels[pullMtsLevel].stepFactor != 0)
+            {
+                warning_error(wi, "pull-nstxout should be a multiple of mts-factor");
+            }
+            if (ir.pull->nstfout % ir.mtsLevels[pullMtsLevel].stepFactor != 0)
+            {
+                warning_error(wi, "pull-nstfout should be a multiple of mts-factor");
+            }
+        }
     }
 }