Move virtual site calculation
authorPascal Merz <pascal.merz@me.com>
Fri, 12 Feb 2021 08:02:58 +0000 (08:02 +0000)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 12 Feb 2021 08:02:58 +0000 (08:02 +0000)
commit2e4d9cb3aae2164176291dfb30172a534dde45c6
treee5f952a5d63111a3b236791837c93e003275d05b
parent35bd40df6a52381abe4992d0e7f1c078207e46b9
Move virtual site calculation

The previous implementation would lead to slight inaccuracies when
virtual positions were calculated before shifting positions in
pressure coupling algorithms. This change moves the calculation to the
top of the loop, right before DD and force calculation.

This also removes an unnecessary call to the virtual site construction
in rerun. That call was placed after force calculation and trajectory
writing, so had no influence since coordinates for the next step are
read from file. Since virtual sites are constructed when reading
coordinates from file, the results should have been correct anyway, the
call just had no influence.

This also moves the call to the virtual site construction in MiMiC.
Similar to the rerun case, the current call happened after virtual
sites are used. This call has been moved to right after the coordinates
are received. This is likely to have lead to wrong results when using
MiMiC with virtual sites.

Refs #3866
docs/release-notes/2022/major/bugs-fixed.rst
src/gromacs/mdrun/md.cpp
src/gromacs/mdrun/mimic.cpp
src/gromacs/mdrun/rerun.cpp