Clear constraints RMSD values upon domains reset
authorArtem Zhmurov <zhmurov@gmail.com>
Mon, 26 Oct 2020 06:34:11 +0000 (06:34 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Mon, 26 Oct 2020 06:34:11 +0000 (06:34 +0000)
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

index 10d8acf46b93f0bb8fbedcf02dfbb1677bef4268..2f8119da4ad3d786a6e3e3944ba678f4516e8961 100644 (file)
@@ -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.