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

**URL:** <https://gromacs.bioexcel.eu/t/command-to-calculate-energy-of-newly-defined-groups-from-an-pre-calculated-xtc-file/4668>\
**Category:** User discussions\
**Tags:** mdp-parameters, mdrun\
**Created:** [August 24, 2022, 8:28am UTC](https://gromacs.bioexcel.eu/t/command-to-calculate-energy-of-newly-defined-groups-from-an-pre-calculated-xtc-file/4668 "2022-08-24T08:28:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [August 24, 2022, 9:53am UTC](https://gromacs.bioexcel.eu/t/command-to-calculate-energy-of-newly-defined-groups-from-an-pre-calculated-xtc-file/4668/2 "2022-08-24T09:53:57Z")

</div>

Hi,  
this post may already answer to one of your questions [Calculating vdW and ES energy between molecules](https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386)

> [@samapika](#):
>
> How should I extract the new edr file containing the energy of the new subgroups?

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

\Alessandra

---

_[View the full topic](https://gromacs.bioexcel.eu/t/command-to-calculate-energy-of-newly-defined-groups-from-an-pre-calculated-xtc-file/4668)._
