How can we calculate energy input/output from multiple thermostats in a system?

GROMACS version: 2024.4
GROMACS modification: No
We are trying to run some NEMD simulations to calculate thermal conductivity. By setting two thermostats with different temperatures on different groups in the system we have created a thermal gradient, but we have yet to find the energy going in and out of the system at the different groups. For the Berendsen thermostat there is a clear expression, based on the group-lambda in the .edr-file, but since it doesn’t produce the canonical ensemble, using it for this purpose seems less than ideal.

Instead we would like to use something like v-rescale or Nosé-Hoover, but for the latter we couldn’t find any group specific energy data except for temperature in the file, and for former group-lambda are listed, but it’s unclear what they express, since no lambda exists in the expression for the thermostat in the documentation or the paper.

Is this group-lambda from v-rescale somehow equivalent to the one for Berendsen(since v-rescale is essentially a Berendsen thermostat with some added noise), a fault in the output from the simulation, or something else?

Thanks!

I suppose from a statistical point of view, we can ignore the stochastic term in the V-rescale, since the expected value is zero, which does leave a simple expression. It’s still unclear what the group-lambda are supposed to be though.

Yes, the group-lambda for V-rescale should be the same velocity scaling factor as in Berendsen.