Add MTS support for pull and AWH
[alexxy/gromacs.git] / src / gromacs / mdtypes / multipletimestepping.cpp
index be56600040bf7a83e75b56c9df7ebab9f42f2ec5..02bcf41be33c7f765b74dd9de4eb892a8bb1d52c 100644 (file)
@@ -67,10 +67,9 @@ void assertMtsRequirements(const t_inputrec& ir)
 
     GMX_RELEASE_ASSERT(ir.mtsLevels[0].stepFactor == 1, "Base MTS step should be 1");
 
-    GMX_RELEASE_ASSERT(
-            (!EEL_FULL(ir.coulombtype) && !EVDW_PME(ir.vdwtype))
-                    || ir.mtsLevels.back().forceGroups[static_cast<int>(MtsForceGroups::LongrangeNonbonded)],
-            "Long-range nonbondeds should be in the highest MTS level");
+    GMX_RELEASE_ASSERT((!EEL_FULL(ir.coulombtype) && !EVDW_PME(ir.vdwtype))
+                               || forceGroupMtsLevel(ir.mtsLevels, MtsForceGroups::LongrangeNonbonded) > 0,
+                       "Long-range nonbondeds should be in the highest MTS level");
 
     for (const auto& mtsLevel : ir.mtsLevels)
     {