^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Removed a potential race condition with GPU update
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Fixed possible (but so far unobserved) race condition in coordinate copy when
using GPU update with dipole moment calculation.
:issue:`4024`
+Prohibited SETTLE interactions for atoms with perturbed masses
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+Older implementations produced varying degrees of wrong results because
+this has never been implemented. Now both ``mdrun`` and ``grompp``
+refuse to handle such a system, suggesting using normal constraints.
+
+:issue:`3959`
+
Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/* check masses */
check_mol(&sys, wi);
+ if (haveFepPerturbedMassesInSettles(sys))
+ {
+ warning_error(wi,
+ "SETTLE is not implemented for atoms whose mass is perturbed. "
+ "You might instead use normal constraints.");
+ }
+
checkForUnboundAtoms(&sys, bVerbose, wi, logger);
if (EI_DYNAMICS(ir->eI) && ir->eI != eiBD)
settled = std::make_unique<SettleData>(mtop);
+ // SETTLE with perturbed masses is not implemented. grompp now checks
+ // for this, but old .tpr files that did this might still exist.
+ if (haveFepPerturbedMassesInSettles(mtop))
+ {
+ gmx_fatal(FARGS,
+ "SETTLE is not implemented for atoms whose mass is perturbed. "
+ "You might\ninstead use normal constraints.");
+ }
+
/* Make an atom to settle index for use in domain decomposition */
for (size_t mt = 0; mt < mtop.moltype.size(); mt++)
{
*
* Copyright (c) 2008,2009,2010, The GROMACS development team.
* Copyright (c) 2012,2013,2014,2015,2016 The GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
return false;
}
+bool haveFepPerturbedMassesInSettles(const gmx_mtop_t& mtop)
+{
+ for (const gmx_moltype_t& molt : mtop.moltype)
+ {
+ if (!molt.ilist[F_SETTLE].empty())
+ {
+ for (int a = 0; a < molt.atoms.nr; a++)
+ {
+ const t_atom& atom = molt.atoms.atom[a];
+ if (atom.m != atom.mB)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
bool havePerturbedConstraints(const gmx_mtop_t& mtop)
{
// This code assumes that all perturbed constraints parameters are actually used
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
//! Checks whether masses are perturbed for free-energy calculations
bool haveFepPerturbedMasses(const gmx_mtop_t& mtop);
+//! Checks whether masses are perturbed for free-energy calculations in SETTLE interactions
+bool haveFepPerturbedMassesInSettles(const gmx_mtop_t& mtop);
+
//! Checks whether constraints are perturbed for free-energy calculations
bool havePerturbedConstraints(const gmx_mtop_t& mtop);