How to decompose the bond energy from .log file onto each residue

GROMACS version:2022.6
GROMACS modification: Yes
Hello everyone, recently I have been developing a coarse-grained force field. Excluding some external factors, my simulation system has undergone energy minimization. During the formal simulation process, as the temperature rises from 0K to 300K and then to 450K, the bond energy gradually increases. The bond energy at 0K is 4.20794e+03, at 300K it’s 1.46290e+04, and at 450K it reaches 2.15781e+04. I understand that this is due to the increase in temperature, but at 300K, the bond energy is obviously too high. Based on my experience, this issue should be due to an unreasonable structure (impractical topological structure). However, visualizing the structure manually is highly inefficient. I urgently need to know if there’s a way to decompose the bond energy onto each residue. I would like to know how to view the contribution of each residue to the bond energy, as this will make it more efficient for me to identify where exactly the problem lies. Any advice will be greatly appreciated!

Unfortunately one can not decompose bonded energy contributions in GROMACS.

But why do you think the bonded energies are wrong? Equipartitioning says that each degree of freedom should have an average potential energy of kT/2. I don’t know how many bonded degrees of freedom you have, but the energy seems to go up proportional with temperature.

Very much a kludge, but if you really need it, you could use the following procedure to extract energy per residue:

  1. Generate a index.ndx file using gmx make_ndx with a group for each residue.
  2. Extract a subset of the trajectory using gmx trjconv -n index.ndx, one for each residue index group
  3. Use gmx convert-tpr -n index.ndx to create a tpr file with only that residue
  4. Perform a rerun for each residue gmx mdrun -rerun partial_res000.xtc -s partial_res000.tpr, such that you get a .edr file for each
  5. Process the .edr file with gmx energy, extract the bonded energy

You’ll likely want to script this, and this is slow regardless.