Merge release-2021 into master
[alexxy/gromacs.git] / src / gromacs / ewald / pme.cpp
index 7438077d0b26031ecaf055243eea06eb928dc27a..e2c87459a0589403888d57fdfead803bbabb869f 100644 (file)
@@ -180,6 +180,20 @@ bool pme_gpu_supports_input(const t_inputrec& ir, std::string* error)
     return errorReasons.isEmpty();
 }
 
+bool pme_gpu_mixed_mode_supports_input(const t_inputrec& ir, std::string* error)
+{
+    gmx::MessageStringCollector errorReasons;
+    // Before changing the prefix string, make sure that it is not searched for in regression tests.
+    errorReasons.startContext("PME GPU in Mixed mode does not support:");
+    errorReasons.appendIf(ir.efep != FreeEnergyPerturbationType::No, "Free Energy Perturbation.");
+    errorReasons.finishContext();
+    if (error != nullptr)
+    {
+        *error = errorReasons.toString();
+    }
+    return errorReasons.isEmpty();
+}
+
 /*! \brief \libinternal
  * Finds out if PME with given inputs is possible to run on GPU.
  * This function is an internal final check, validating the whole PME structure on creation,