Command to calculate energy of newly defined groups from an pre calculated xtc file

GROMACS version: 2018.1
GROMACS modification: No
I have already completed the simulation. But now I am interested in calculating the energy of different system subgroups. I found that I can evaluate the same using gmx mdrun -rerun command.
Do I need to generate a fresh tpr file and feed in the command? How should I extract the new edr file containing the energy of the new subgroups?

Please suggest.

Hi,
this post may already answer to one of your questions Calculating vdW and ES energy between molecules

You can use gmx energy to extract energy from energy file *.edr.

\Alessandra