# Virtual\_sites

**URL:** https://gromacs.bioexcel.eu/t/virtual-sites/12839
**Category:** User discussions
**Tags:** mdrun
**Created:** [October 27, 2025, 7:10pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839 "2025-10-27T19:10:29Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [October 27, 2025, 7:10pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/1 "2025-10-27T19:10:29Z")

</div>

GROMACS version:5.1.40  
GROMACS modification: Yes/No  
Hi, I was trying to use [virtual\_sites\_2] to see the halogen bond between MeOH\_O and EP1 and EP2 of C-Cl bonds in dichloromethane. But after production run I find the interaction energies between them straight 0. I used small positive charges on EP1 and EP2( +0.003). No error occured otherwise.  
I included two virtual sites in Ch2Cl2.itp as:

[atoms]

6 EP 1 DCM EP1 1 0.0300 0.0000 ; sigma-hole site on Cl0 (mass 0)  
7 EP 1 DCM EP2 1 0.0300 0.0000 ; sigma-hole site on Cl0 (mass 0)

[virtual\_sites2]  
site atom\_i atom\_j funct a  
6 1 2 1 1.17  
7 1 3 1 1.17

plz helpThnx in advance.

---

<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: [October 28, 2025, 1:41pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/2 "2025-10-28T13:41:20Z")

</div>

How did you obtain the interaction energies between them?

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [October 30, 2025, 7:26pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/3 "2025-10-30T19:26:08Z")

</div>

Well I used small positive charges along the C–Cl bonds nearer to Cl atoms as I told as classical sigma holes. My system contained 500 MeOH and 500 CH2Cl2. From energy minimization to NPT equilibriation I used these CH2Cl2 molecules with 2 sigma-holes. Now during my production run, I created two index groups, indexing EP1 and EP2 of CH2Cl2 and O of MeOH. Then I used the command: “energygrps =MeOH\_O CH2Cl2\_EP1 CH2Cl2\_EP2” to get segregated interaction energy values between each two of the 3 index groups. At the end of production run, you can find segregated Coulomb SR, LJ SR etc energy in between the two specific groups like MeOH-O and CH2Cl2-EP1…like that. But in my case I find the interaction energy between EP1 and 2 and O of MeOH totally ZERO!!! Like the EP sites don’t even exist!! Am I doing the indexing wrong? Or is there some other problem? Thnx in advance.

---

<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: [November 4, 2025, 3:24pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/4 "2025-11-04T15:24:14Z")

</div>

That sounds strange. Are all other pairs terms as you expect or are there more zero?

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [November 11, 2025, 2:07pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/5 "2025-11-11T14:07:33Z")

</div>

After you suggested, I searched for all other pairs. And yes all are zero. Only the interaction energies with itself ain’t zero. So I guess the problem is in the energygrps command I’m using or in the indexing? I grouped similar types of atoms under corresponding index groups. I’ve attached an image. And many, many thanks for answering my questions. Big help!!!

 ![WhatsApp Image 2025-11-11 at 13.17.01_0a189a47](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/c/c72fd0d01192376fffb21d0834c0f37fb5890365.jpeg)

---

<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: [November 11, 2025, 2:22pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/6 "2025-11-11T14:22:02Z")

</div>

I can’t say anything based on just the figure, as the names of the groups don’t match the ones in your post above.

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [November 13, 2025, 7:32pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/7 "2025-11-13T19:32:30Z")

</div>

yeah, the thing is I used MeOH and CH2Cl2 and added small massless positive charges(+0.03) along the C-Cl bonds, very close to Cl to resemble the sigma holes responsible for the halogen bonds. Now I use virtual sites to denote these sigma-holes as Extra Points in .itp file of CH2Cl2. My intention was to see the amount of energy b/w the oxygen and the EPs. Then I indexed both O and EP and used energygrps in production run, but that came as zero. So, as per your valuable suggestion, I tried the same for Cl and O just in case, but those are zero as well, and you can see it in the photo.

Can you please tell me one thing? If I wanna see the interaction energy values like Coulomb-SR, LJ-SR etc, between two specific atoms in the molecules I’m using, provided the two atoms are from different molecules, is it possible in GROMACS? Again thnx in advance!!

---

<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: [November 13, 2025, 8:42pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/8 "2025-11-13T20:42:42Z")

</div>

Yes, GROMACS can do that, although you will miss the PME mesh contribution.

But I see now that you seem to be using a 9 year old version. Maybe the issue there is that you are running on a GPU which will not give you the group contributions, but I am not sure that version had that issue. If you are running with a GPU, try running on the CPU instead.

But we recommend using the latest version of GROMACS.

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [November 14, 2025, 4:42pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/9 "2025-11-14T16:42:07Z")

</div>

Thanks, and I actually saw in the manual of 5.1.4 and they accept virtual sites! But I’ll take your suggestion and try again on a latest version. Also will I get the segragated interaction energies by the way I’m proceeding? Or should I have to do something more?

---

<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: [November 17, 2025, 9:15am UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/10 "2025-11-17T09:15:18Z")

</div>

That should work, apart from the PME mesh contribution.

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [November 19, 2025, 7:08am UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/11 "2025-11-19T07:08:08Z")

</div>

Thanks again!!

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [December 4, 2025, 2:45pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/12 "2025-12-04T14:45:47Z")

</div>

just a small question, is using 1 virtual site enough for Cl—O halogen bond? if i have to use more can you plz guide briefly, how to?

---

<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 4, 2025, 3:00pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/13 "2025-12-04T15:00:43Z")

</div>

I have never looked into using virtual sites for locating charges other than in water, so I can not say.

---

<div class="post-metadata">

### Author: ![bluejayinbox](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@bluejayinbox](https://gromacs.bioexcel.eu/u/bluejayinbox)
#### Post date: [December 6, 2025, 1:48pm UTC](https://gromacs.bioexcel.eu/t/virtual-sites/12839/14 "2025-12-06T13:48:24Z")

</div>

ok cool, thank you.
