# Why it cannot calculate the "total energy" when runs "gmx mdrun -rerun"?

**URL:** <https://gromacs.bioexcel.eu/t/why-it-cannot-calculate-the-total-energy-when-runs-gmx-mdrun-rerun/329>\
**Category:** User discussions\
**Created:** [June 17, 2020, 7:31am UTC](https://gromacs.bioexcel.eu/t/why-it-cannot-calculate-the-total-energy-when-runs-gmx-mdrun-rerun/329 "2020-06-17T07:31:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://gromacs.bioexcel.eu/u/Tim)\
**Post date:** [June 17, 2020, 7:31am UTC](https://gromacs.bioexcel.eu/t/why-it-cannot-calculate-the-total-energy-when-runs-gmx-mdrun-rerun/329/1 "2020-06-17T07:31:08Z")

</div>

GROMACS version: 2020  
GROMACS modification: No  
Here post your question

Hi, everyone!

When I use “gmx energy -f \*.edr” to analyze the energy of a MD simulation, I can get the option “total energy” for the dialog box. But if I perform “gmx mdrun -rerun \*.xtc” f the generate the .edr file, then, it doesn’t have the “total energy” option in the following “gmx energy -f \*.edr” operation.

Could you tell me why this happens and how can I calculate the “total energy” of a .edr file generated by “gmx mdrun -redun”?

Many thanks and best,

Tim

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [June 18, 2020, 3:25pm UTC](https://gromacs.bioexcel.eu/t/why-it-cannot-calculate-the-total-energy-when-runs-gmx-mdrun-rerun/329/2 "2020-06-18T15:25:05Z")

</div>

XTC files do not store velocities, so you cannot compute kinetic energy with `mdrun -rerun`. Since the total energy would therefore be equal to the potential energy (since KE = 0 in this case), it is not something you can or should select.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://gromacs.bioexcel.eu/u/Tim)\
**Post date:** [June 23, 2020, 5:49am UTC](https://gromacs.bioexcel.eu/t/why-it-cannot-calculate-the-total-energy-when-runs-gmx-mdrun-rerun/329/3 "2020-06-23T05:49:48Z")

</div>

Thank you very much!  
Tim
