Gromacs 2021 - Reference Manual - Stochastic Dynamics

GROMACS version:
GROMACS modification: Yes/No
Here post your question

Dear developer-team,
my question concerns the entry for Algorithms >> Stochastic Dynamics of the Gromacs 2021 Reference Manual:
https://manual.gromacs.org/current/reference-manual/algorithms/stochastic-dynamics.html

In the equation for Delta_v under the square root there is the term (1-alpha^2). Is it possible that this term is incorrect and should actually read (1- exp(-2 gamma Delta t))? The latter is also what I found implemented in gromacs/src/gromacs/mdlib/update.cpp on Github.
The mathematical expression of the integrator is very crucial for my work which is why I want to double check.
Looking forward to you answer and thank you in advance.
Regards,
skieninger

The formula in the manual looks correct to me. But I am not 100% sure. The formula obeys fluctuation dissipation analytically.

The formula you mention differs by 1-(e^-(gamma Delta t))^2 which is very small compared 1 when gamma*Delta t is small.

Thank you for the fast reply. Yes, it obeys fluctuation dissipation but my question concerns the exact implementation in Gromacs.

In the manual we have:
1 - alpha^2 = 1 - (1 - exp(-gamma Delta t))^2 = 2 exp(-gamma Delta t) - exp (-2 gamma Delta t)

but implemented I found:
1 - exp (- 2 gamma Delta t) and not the expression that is stated in the manual

The implemented equation is also consistent with the paper that is cited for the algorithm but the equation from the manual is not. In the paper they define this specific term as
f(2 - f) with f = (1-exp(- gamma Delta t))
which results in f(2 - f) = 1 - exp (- 2 gamma Delta t).

Paper:
https://pubs.acs.org/doi/10.1021/ct3000876

It can of course be, that I made a mistake when I looked up the implemented version in Gromacs.
My question is, does the manual represent what is actually implemented?

Unless I’m mistaken, the code implements exactly the formulas in the manual.

But I see now that those formulas do not analytically obey dissipation-fluctuation, while the formulas in the paper do.

Alright, then I was mistaken by looking at

https://github.com/gromacs/gromacs/blob/3ba95aac31a47eaf90ad7c5394b4cbe3d9a88a1a/src/gromacs/mdlib/update.cpp

Thank you very much, that helped a lot.