Per-group virial

GROMACS version: 2023
GROMACS modification: No

Hi,

Is there a “easy” way to obtain the virial and the kinetic energy tensor (or the pressure) per-group instead of the whole system? I don’t know if these quantities are computed at all.

The kinetic energy is a per atom property, so that can be reported per group. You get this per t-coupling group.
The virial comes from forces, which are usually work between multiple atoms. So you can not get that per group.

Indeed, I was wondering if the virial coming only from the interactions within a given group is computed, but I now relize it may not have sense.

If you have only pair forces between the groups, you could theoretically compute virial contributions between pairs of group, analogously to the group pair energy contributions. In practice this requires a lot of book keeping an multiple PME mesh calculations to get all the contributions.