From 6297ab9f7f2d1065edaa38be80cdb099c40af1b1 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Tue, 29 Jun 2021 11:43:07 +0200 Subject: [PATCH] grompp no longer modifies nstcomm --- docs/release-notes/2022/major/miscellaneous.rst | 6 ++++++ src/gromacs/gmxpreprocess/readir.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/2022/major/miscellaneous.rst b/docs/release-notes/2022/major/miscellaneous.rst index 1a242e3446..1f050b2921 100644 --- a/docs/release-notes/2022/major/miscellaneous.rst +++ b/docs/release-notes/2022/major/miscellaneous.rst @@ -7,3 +7,9 @@ Miscellaneous Also, please use the syntax :issue:`number` to reference issues on GitLab, without the a space between the colon and number! +grompp no longer modifies nstcomm +""""""""""""""""""""""""""""""""" + +grompp will no longer set nstcomm, the interval for center of mass motion +removal, equal to nstcalcenergy when nstcomm < nstcalcenergy. +A note is still printed in that case. diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index 4ca4390d14..adba76ef7d 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -1059,12 +1059,12 @@ void check_ir(const char* mdparin, ir->nstcomm = abs(ir->nstcomm); } - if (ir->nstcalcenergy > 0 && ir->nstcomm < ir->nstcalcenergy) + if (ir->nstcalcenergy > 0 && ir->nstcomm < ir->nstcalcenergy + && ir->comm_mode != ComRemovalAlgorithm::LinearAccelerationCorrection) { warning_note(wi, - "nstcomm < nstcalcenergy defeats the purpose of nstcalcenergy, setting " - "nstcomm to nstcalcenergy"); - ir->nstcomm = ir->nstcalcenergy; + "nstcomm < nstcalcenergy defeats the purpose of nstcalcenergy, consider " + "setting nstcomm equal to nstcalcenergy for less overhead"); } if (ir->comm_mode == ComRemovalAlgorithm::Angular) -- 2.22.0