Merge commit d30f2cb6 from release-2020 into master
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / readir.cpp
index d6dbbe240cc215fe0462b9a06553d53c807ee83d..9a5e6908edd86719bdd72c7e05852f5b64bb6d77 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) 2013-2019, by the GROMACS development team, led by
+ * Copyright (c) 2013-2019,2020, 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.
@@ -2496,7 +2496,8 @@ void get_ir(const char*     mdparin,
             }
             if (ir->eI == eiMD && (opts->couple_lam0 == ecouplamNONE || opts->couple_lam1 == ecouplamNONE))
             {
-                warning(wi,
+                warning_note(
+                        wi,
                         "For proper sampling of the (nearly) decoupled state, stochastic dynamics "
                         "should be used");
             }
@@ -3863,12 +3864,12 @@ static void check_disre(const gmx_mtop_t* mtop)
     }
 }
 
-static bool absolute_reference(t_inputrec* ir, gmx_mtop_t* sys, bool posres_only, ivec AbsRef)
+static bool absolute_reference(const t_inputrec* ir, const gmx_mtop_t* sys, const bool posres_only, ivec AbsRef)
 {
     int                  d, g, i;
     gmx_mtop_ilistloop_t iloop;
     int                  nmol;
-    t_iparams*           pr;
+    const t_iparams*     pr;
 
     clear_ivec(AbsRef);
 
@@ -4086,6 +4087,13 @@ void triple_check(const char* mdparin, t_inputrec* ir, gmx_mtop_t* sys, warninp_
 
     set_warning_line(wi, mdparin, -1);
 
+    if (absolute_reference(ir, sys, false, AbsRef))
+    {
+        warning_note(wi,
+                     "Removing center of mass motion in the presence of position restraints might "
+                     "cause artifacts");
+    }
+
     if (ir->cutoff_scheme == ecutsVERLET && ir->verletbuf_tol > 0 && ir->nstlist > 1
         && ((EI_MD(ir->eI) || EI_SD(ir->eI)) && (ir->etc == etcVRESCALE || ir->etc == etcBERENDSEN)))
     {