Extraction of single point energy for each frame of the trajecotory

GROMACS version:
GROMACS modification: Yes/No
Here post your question
dear gromacs developers and users. i want to obtain the single-point energy for each frame of the trajectory file. I tried it using the cpptraj but it was not accomplished. I am requesting you to provide me a way to get the single point energy of each frame from the trajectory file. my trajectory contains 1001 frames.

One way to do that would be to create a new tpr from the input file you used to create the tpr used in the simulation, except in the mdp file, set nstenergy = 1. Then do a rerun gmx mdrun -rerun traj.xtc -deffnm rerunout, and you will get a rerunout.edr containing energy evaluation for all frames in traj.xtc. Use gmx energy to get the data from that.

thankyou for your your reply. I will try this and will let you know if any error occur. thank you so much.