Merge branch release-5-1 into release-2016
[alexxy/gromacs.git] / src / gromacs / mdlib / mdatoms.cpp
index ffa5825bec61fec865ce2060ebab9732e8ba7b0f..63ff5e8b495b08bf6ed2715c681312d3aeaa1214 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016, 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.
@@ -301,14 +301,17 @@ void atoms2md(const gmx_mtop_t *mtop, const t_inputrec *ir,
                 g = md->cFREEZE[i];
                 if (opts->nFreeze[g][XX] && opts->nFreeze[g][YY] && opts->nFreeze[g][ZZ])
                 {
-                    /* Set the mass of completely frozen particles to ALMOST_ZERO iso 0
-                     * to avoid div by zero in lincs or shake.
-                     * Note that constraints can still move a partially frozen particle.
+                    /* Set the mass of completely frozen particles to ALMOST_ZERO
+                     * iso 0 to avoid div by zero in lincs or shake.
                      */
                     md->invmass[i]  = ALMOST_ZERO;
                 }
                 else
                 {
+                    /* Note: Partially frozen particles use the normal invmass.
+                     * If such particles are constrained, the frozen dimensions
+                     * should not be updated with the constrained coordinates.
+                     */
                     md->invmass[i]  = 1.0/mA;
                 }
             }