Kinetic energy and temperatures slightly off for md-vv Trotter NPT
When using Nose-Hoover with md-vv (Trotter decomposition, legacy code path), the call sequence of the first half step looks something like
- calculate forces at time t
- propagate velocities v(t-dt/2) → v(t) & constrain
- compute globals - calculate kinetic energy at time t
- propagate Nose-Hoover chain degrees of freedom using Ekin at time t
- scale velocities and Ekin according to Nose-Hoover chain
- print x/v/f, store Ekin / T for output later in the step
This is followed by the second half step and the energy output.
Step 5. was guarded by
if (inputrecNvtTrotter(ir) && ir->eI == eiVV), which is only true when doing NVT (no pressure coupling), not when doing NPT. This is the same problem as in #3796 (closed), Bug 1 - the meaning of the function changed, but this wasn't fixed in all places.
This means that KE and Temperature were very slightly off since GROMACS 4.6. The difference is unlikely to have been significant for any application except for rigorous algorithm validation.