Recalculate potential energy according to a different topology

GROMACS version: 2019.6
GROMACS modification: No


I need to calculate the potential energy of the configurations generated during my MD run according to a different potential. The system comprises spheres interacting via LJ potentials.
I would like to take a simulation that has already been run and recalculate the potential energy for each frame according to a different LJ potential between them. This is required for input to pyMBAR.

Is there a GROMACS utility that I can use to rerun over my trajectory to get this information?

Thanks in advance!

Generate a new .tpr file with the new topology and use mdrun -rerun on the existing trajectory, e.g.

gmx mdrun -s new.tpr -rerun orig.xtc

Thanks Justin!
Can I also specify table files during the rerun such as the following?

gmx mdrun -s new.tpr -rerun orig.trr -table table.xvg

Never tried it, but I assume so.