# Energy group exclusions

**URL:** <https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526>\
**Category:** User discussions\
**Created:** [February 2, 2021, 9:49am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526 "2021-02-02T09:49:50Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsigal](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nsigal](https://gromacs.bioexcel.eu/u/nsigal)\
**Post date:** [February 2, 2021, 9:49am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/1 "2021-02-02T09:49:50Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
Hi. I am a little bit confused with energygrps and energygrp-excl. In the given example of gromacs:  
energygrp-excl = Protein Protein SOL SOL  
Does it mean that the molecules of protein will not interact with the molecules of solvent? What about the interactions of protein molecules with other protein molecules? Why are duplicate names used (SOL SOL)? If I want in a simulation to turn off the non-bonded interactions between same species is that possible?  
Thank you in advance!

---

<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:** [February 2, 2021, 1:30pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/2 "2021-02-02T13:30:01Z")

</div>

Hi,  
Imagine that you have the following groups in your system Protein\_A, Protein\_B and SOL. Note the group name refer to name given in index file.  
“energygrp-excl = Protein\_A Protein\_A SOL SOL” means that all non-bonded interactions between Protein\_A and Protein\_A are excluded and that all the non-bonded interactions between SOL and SOL are excluded.

> Does it mean that the molecules of protein will not interact with the molecules of solvent?

No, only the non-bonded interactions between the protein and the solvent are included.

> Why are duplicate names used (SOL SOL)?

The energy group exclusion is always given in pair that is the reason

I hope it is more clear.  
Alessandra

---

<div class="post-metadata">

**Author:** ![nsigal](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nsigal](https://gromacs.bioexcel.eu/u/nsigal)\
**Post date:** [February 2, 2021, 3:36pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/3 "2021-02-02T15:36:30Z")

</div>

Dear Alessandra.  
Thank you a lot for your answer. Just a clarification. I want to exclude non-bonded interactions between same species that are not classified as proteins. Specifically, I am working with polymers, so I made a .ndx file and included all the atoms in a [IPP] group. Then, in the .mdp file, I used the options:  
energygrps = IPP  
energygrp-excl = IPP IPP  
Is that correct?

---

<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:** [February 3, 2021, 1:55pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/4 "2021-02-03T13:55:28Z")

</div>

Hi,  
The name corresponds to molecule names defined at the end of your topology file. If your polymer is defined IPP at the end section of topol.top that it is good.  
Alessandra

---

<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:** [February 3, 2021, 3:42pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/5 "2021-02-03T15:42:57Z")

</div>

One is not limited to `[moleculetype]` entries for `energygrps`. Any index group should work fine.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [February 3, 2021, 5:25pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/6 "2021-02-03T17:25:57Z")

</div>

Note that energy group exclusions are no longer supported since version 2020, because they were only supported with the group scheme. We intend to support these again at some point in time. If the molecules you want to exclude interactions between only contain atomtypes that do not occur in the rest of the system, you can achieve the same by setting the LJ pair parameters between these atomtypes to 0.

---

<div class="post-metadata">

**Author:** ![nsigal](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nsigal](https://gromacs.bioexcel.eu/u/nsigal)\
**Post date:** [February 4, 2021, 8:31am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/7 "2021-02-04T08:31:34Z")

</div>

Thank you. I have already read this in the manual. But I am using an older version for this purpose. Indeed, It is a useful option to have it.

---

<div class="post-metadata">

**Author:** ![di\_jin](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@di\_jin](https://gromacs.bioexcel.eu/u/di_jin)\
**Post date:** [December 6, 2022, 12:29pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/8 "2022-12-06T12:29:05Z")

</div>

> [@nsigal](#):
>
> energygrps = IPP  
> energygrp-excl = IPP IPP

Hi Hess,

Is this done in [pairtypes] in the forcefield.itp file, where you have to list all the permutation of atoms between the two groups of molecules and write zeros for sigma and epsilon?

Thanks!

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [December 8, 2022, 8:09am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/9 "2022-12-08T08:09:23Z")

</div>

No, the non-bonded pair parameters are in the [nonbond\_params] section.

---

<div class="post-metadata">

**Author:** ![lsvannur](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@lsvannur](https://gromacs.bioexcel.eu/u/lsvannur)\
**Post date:** [February 2, 2024, 8:22pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/10 "2024-02-02T20:22:32Z")

</div>

May I know how to achieve this setting interaction between certain atom types to 0 as mentioned by @hess in above comment? Any link or resource would be helpful

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [February 20, 2024, 9:41am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/11 "2024-02-20T09:41:54Z")

</div>

You need to set both non-bonded parameters to zero for all pairs of types you want to exclude interactions between. You need to add a [nonbond\_params] section, for instance at the top of your topology file after including the force field fields. See the manual for the formatting of this section.

---

<div class="post-metadata">

**Author:** ![thor](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@thor](https://gromacs.bioexcel.eu/u/thor)\
**Post date:** [February 26, 2025, 3:36am UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/12 "2025-02-26T03:36:50Z")

</div>

I wonder if there is a version of gromacs after 2020 that supports the energygrp-excl feature? Also, is there a difference between this function and setting epsilon between atoms to 0 in the [nonbond\_params] section of the **top** file. If I want to eliminate the interaction completely, do I also need to set the charge between the two atoms to 0?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 3, 2025, 2:59pm UTC](https://gromacs.bioexcel.eu/t/energy-group-exclusions/1526/13 "2025-03-03T14:59:24Z")

</div>

No, energy group exclusions are not longer supported and we do not plan to add them. Anyhow they are rather useless if you can not exclude the long-range component of the electrostatics.

For LJ you can set the parameters to zero, if all atom types differ between the group you want to exclude. Charges are per atom, not atom pair, so those can not be excluded.
