# Calculating vdW and ES energy between molecules

**URL:** <https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386>\
**Category:** User discussions\
**Created:** [June 27, 2020, 9:09pm UTC](https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386 "2020-06-27T21:09:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosa\_16](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@Rosa\_16](https://gromacs.bioexcel.eu/u/Rosa_16)\
**Post date:** [June 27, 2020, 9:09pm UTC](https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386/1 "2020-06-27T21:09:09Z")

</div>

GROMACS version: 2020.2  
GROMACS modification: No

Hello friends,

I wanted to calculate the vdW and ES energy between two molecular groups in my system. However, I have only been successful in calculating vdW and ES energy of the whole system. To calculate the energies between the molecular groups, would I have to make an index file for the 2 molecular groups and use this folder as an input for the gmx energy command or is there something else I should approach? Please let me know any help is appreciated.

Best regards,  
Rosa

---

<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 29, 2020, 12:17pm UTC](https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386/2 "2020-06-29T12:17:44Z")

</div>

If you want interaction energy between groups, that is what `energygrps` in the `.mdp` file is for. Generate a new `.tpr` file with the desired groups, and use `mdrun -rerun` to recalculate the energies from the existing trajectory.

---

<div class="post-metadata">

**Author:** ![Rosa\_16](https://avatars.discourse-cdn.com/v4/letter/r/77aa72/32.png) [@Rosa\_16](https://gromacs.bioexcel.eu/u/Rosa_16)\
**Post date:** [July 1, 2020, 4:21pm UTC](https://gromacs.bioexcel.eu/t/calculating-vdw-and-es-energy-between-molecules/386/3 "2020-07-01T16:21:59Z")

</div>

Dear Justin,

Thank you for your reply. I have successfully calculated the interactions energies between two molecular groups.

Best regards,  
Rosa
