# Energy calculations of residues is zero

**URL:** <https://gromacs.bioexcel.eu/t/energy-calculations-of-residues-is-zero/2474>\
**Category:** User discussions\
**Created:** [July 8, 2021, 12:35pm UTC](https://gromacs.bioexcel.eu/t/energy-calculations-of-residues-is-zero/2474 "2021-07-08T12:35:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkeller](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fkeller](https://gromacs.bioexcel.eu/u/fkeller)\
**Post date:** [July 8, 2021, 12:35pm UTC](https://gromacs.bioexcel.eu/t/energy-calculations-of-residues-is-zero/2474/1 "2021-07-08T12:35:27Z")

</div>

GROMACS version: 2020  
GROMACS modification: Yes

Dear Gromacs-Users,  
I rerun a trajectory to extract the SR interaction energies of two residues. The output energy from gmx energy is 0 over the course of the whole simulation which is impossible (from visual inspection those residues are too close for 0 interaction). This question is related to an earlier question I posted ([thread](https://gromacs.bioexcel.eu/t/zero-interaction-energy-from-mdrun-rerun-in-gmx-2020-vs-non-zero-energies-in-gmx-2018/2396)), but I think I wasn’t specific enough here.

I used a simple index file where the indices of the all residues are defined and added those energy group names to the energygroups input flag of the input .mdp file.  
I did not use GPUs to rerun the trajectories and extract the interaction energies! I don’t know why this info still appears…

The partial output of mdrun:

> GROMACS: gmx mdrun, version 2020.6  
> Executable: /home/f/f\_kell07/software/gromacs\_analysis-2020.6/bin/gmx  
> Data prefix: /home/f/f\_kell07/software/gromacs\_analysis-2020.6  
> Working dir: /scratch/tmp/f\_kell07/analysis\_mclattice/test\_energy\_gmx\_version/resid1\_wat/2020  
> Command line:  
> gmx mdrun -v -ntomp 8 -ntmpi 1 -deffnm energycalc\_2020 -rerun …/…/dppc\_330\_fragment.xtc
> 
> Reading file energycalc\_2020.tpr, VERSION 2020.6 (single precision)  
> Multiple energy groups is not implemented for GPUs, falling back to the CPU. For better performance, run on the GPU without energy groups and then do gmx mdrun -rerun option on the trajectory with an energy group .tpr file.  
> Changing nstlist from 20 to 100, rlist from 1.2 to 1.318  
> Using 1 MPI thread  
> Non-default thread affinity set, disabling internal thread affinity  
> Using 8 OpenMP threads

Thanks for your efforts to help! :-)  
Best  
Fabian

---

<div class="post-metadata">

**Author:** ![gvigers](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gvigers](https://gromacs.bioexcel.eu/u/gvigers)\
**Post date:** [April 1, 2022, 6:37pm UTC](https://gromacs.bioexcel.eu/t/energy-calculations-of-residues-is-zero/2474/2 "2022-04-01T18:37:12Z")

</div>

I’m seeing the same thing when I try and calculate interaction energies for a subset of water molecules. “gmx hbonds” works fine , but “gmx energy -rerun -nb cpu” gives all zeros. The same problem occurs with gromacs 2021.2 and 2022. This is the second thread I’ve found that seems to relate to the problem, but I don’t see any resolution.
