From c900b35643a9593a6a0cff000cb0b10232769279 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Mon, 16 Dec 2019 10:50:06 +0100 Subject: [PATCH] Add note for COM removal with position restraints Center of mass motion removal in combination with position restraints will often cause artifacts. We should (automatically) disable this, but this will disrupt workflows, so for now grompp will issue a note. Refs #3244 Change-Id: If983e918d26f0af2fab96d44d0f2b1fc3cedb901 --- src/gromacs/gmxpreprocess/readir.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index d6dbbe240c..35f663a8f4 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -3863,12 +3863,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 +4086,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))) { -- 2.11.4.GIT