"Virtual sites are not supported with the GPU update.\n");
GMX_RELEASE_ASSERT(ed == nullptr,
"Essential dynamics is not supported with the GPU update.\n");
- GMX_RELEASE_ASSERT(!ir->bPull && !ir->pull,
+ GMX_RELEASE_ASSERT(!ir->bPull || !pull_have_constraint(ir->pull),
"Pulling is not supported with the GPU update.\n");
GMX_RELEASE_ASSERT(fcd->orires.nr == 0,
"Orientation restraints are not supported with the GPU update.\n");
{
return pull->bConstraint;
}
+
+bool pull_have_constraint(const pull_params_t* pullParameters)
+{
+ if (pullParameters == nullptr)
+ {
+ return false;
+ }
+ for (int c = 0; c < pullParameters->ncoord; c++)
+ {
+ if (pullParameters->coord[c].eType == epullCONSTRAINT)
+ {
+ return true;
+ }
+ }
+ return false;
+}
*/
gmx_bool pull_have_constraint(const struct pull_t* pull);
+/*! \brief Returns if inputrec has pull coordinates with constraint pulling.
+ *
+ * \param[in] pullParameters Pulling input parameters from input record.
+ */
+bool pull_have_constraint(const pull_params_t* pullParameters);
+
/*! \brief Returns the maxing distance for pulling
*
* For distance geometries, only dimensions with pcrd->params[dim]=1
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdrunoptions.h"
+#include "gromacs/pulling/pull.h"
#include "gromacs/taskassignment/taskassignment.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
{
errorMessage += "Essential dynamics is not supported.\n";
}
- if (inputrec.bPull || inputrec.pull)
+ if (inputrec.bPull && pull_have_constraint(inputrec.pull))
{
- // Pull potentials are actually supported, but constraint pulling is not
- errorMessage += "Pulling is not supported.\n";
+ errorMessage += "Constraints pulling is not supported.\n";
}
if (doOrientationRestraints)
{