Closed christophlohrmann closed 1 year ago
this ticket is suitable for new/early contributors, as most likely the fix is limited to a very few places in the Langevin thermostat code, pertaining to conversions between lab and the particle's co-rotating body frame.
@christophlohrmann White noise is invariant under rotation, so there is no need to transform it.
even for anisotropic particles? It just feels weird that the friction matrix is "full" and the noise matrix always a diagonal matrix in lab frame no matter the particle orientation
Well my statement is correct, but not related :-) You are right: it's about the prefactors, not the noise, which of course needs to be transformed. Would be maybe a good idea to put the calculation for the anisotropic case into a function and add a unit test...
couldn't agree more
Brownian themorstat is fine, though
I only checked friction. This https://github.com/espressomd/espresso/blob/6d08b88b3b1cf414deb046cc0562e7faa065f312/src/core/thermostats/langevin_inline.hpp#L84 also looks wrong to me. The friction force is converted from body to lab frame, but the noise is not.
EDIT: Added temperature check that fails due to not-body-to-lab-converted noise prefactor