Using dynamic index groups for gmx mdrun -rerun

GROMACS version: 2020.1
GROMACS modification: No

Hi,

I want to calculate the interaction energy between a solute and the water molecules within 0.5 nm of the solute. First I have used gmx select to create a dynamic index file for the hydration water molecules (using the flag -on). Now I want to use gmx mdrun -rerun to calculate the desired energies. But I am not sure how to define the energy groups in the rerun.mdp file. One group will obviously be the solute itself. But how do I mention the hydration layer waters as a group, since it changes every time frame in the ndx file?

I understand that for a post processing script like gmx dipoles, gmx hbond etc., I can use dynamic index group frame by frame using a shell script. But how to do that in a rerun?

Any advice is much appreciated. Thanks.

Best,
Saumyak

As far as I know, you can only do index groups with a fixed list of atoms during simulation - there is not the same machinery as used in the analysis tool.

You might need to go frame by frame (extract one frame, generate the correct index using gmx select and your selection query, rerun for a single frame, extract energies), which is a bit inconvenient and slow, but should work.

(There is also the concern of whether the quantity is meaningful in itself - interaction energy accuracy is generally not a target of forcefields - but you know your method best)

Thanks for your reply. I guess there’s no way to avoid the tedious path.

I agree, the values are completely dependent on the force field and might not be experimentally accurate. But I am not concerned about the values as such. My intention is to look into the amplitude of fluctuations. So that should not be a huge problem. But the technicality of the problem bothers me.

This is not possible to do with GROMACS, unless you create a new tpr file for every frame.

But note that looking at potential energy alone is nearly meaningless. Interactions in many solvents, and water in particular, show very large enthalpy/entropy compensation. So the enthalpy will not tell you much.

Thanks for your reply.