Properly check if there are perturbed constraints or masses
[alexxy/gromacs.git] / src / gromacs / taskassignment / decidegpuusage.cpp
index 5fb2410a7036272ad077d9e2e5f3c389183de4f4..7d96638fde3fe7c3ad8444fac2575a9d7a53b1c4 100644 (file)
@@ -650,8 +650,7 @@ bool decideWhetherToUseGpuForUpdate(const bool                     isDomainDecom
         // The graph is needed, but not supported
         errorMessage += "Orientation restraints are not supported.\n";
     }
-    if (inputrec.efep != efepNO
-        && (haveFreeEnergyType(inputrec, efptBONDED) || haveFreeEnergyType(inputrec, efptMASS)))
+    if (inputrec.efep != efepNO && (haveFepPerturbedMasses(mtop) || havePerturbedConstraints(mtop)))
     {
         errorMessage += "Free energy perturbation for mass and constraints are not supported.\n";
     }