From 01297f012f8171692206cbb648486199b8c951cc Mon Sep 17 00:00:00 2001 From: Artem Zhmurov Date: Mon, 26 Oct 2020 06:34:11 +0000 Subject: [PATCH] Clear constraints RMSD values upon domains reset When atoms migrate from one domain to another, some domains can be left without constraints assigned to them. In this case, old RMSD data can contaminate the output and lead to arithmetic exceptions. Also match conditinal when constraints RMSD values are collected and when printed. Fixes #3742, related to #3305. --- src/gromacs/mdlib/lincs.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gromacs/mdlib/lincs.cpp b/src/gromacs/mdlib/lincs.cpp index 10d8acf46b..2f8119da4a 100644 --- a/src/gromacs/mdlib/lincs.cpp +++ b/src/gromacs/mdlib/lincs.cpp @@ -2132,6 +2132,9 @@ void set_lincs(const InteractionDefinitions& idef, } set_lincs_matrix(li, invmass, lambda); + + li->rmsdData[0] = 0.0; + li->rmsdData[1] = 0.0; } //! Issues a warning when LINCS constraints cannot be satisfied. -- 2.22.0