# Hbond calculation

**URL:** <https://gromacs.bioexcel.eu/t/hbond-calculation/5085>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [October 21, 2022, 2:32pm UTC](https://gromacs.bioexcel.eu/t/hbond-calculation/5085 "2022-10-21T14:32:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sancharitanni](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sancharitanni](https://gromacs.bioexcel.eu/u/sancharitanni)\
**Post date:** [October 21, 2022, 2:32pm UTC](https://gromacs.bioexcel.eu/t/hbond-calculation/5085/1 "2022-10-21T14:32:08Z")

</div>

I want number of hydrogen bond between two groups using the commands below:  
gmx\_mpi make\_ndx -f npt\_prod1.gro -o index2.ndx  
gmx\_mpi hbond -f npt\_prod1.xtc -s npt\_prod1.tpr -n index2.ndx -num emim-cyno.xvg

when I checked my trajectories in vmd I can see hydrogen bond between these particular groups (at 3.5 A and 30 degree geometric criteria) however when I choose those particular group in gromacs it was shown that ,no donors and accept-or found.Can anyone have suggestions?why I am not getting hbonds between these groups.

Thank you

---

<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:** [October 21, 2022, 3:37pm UTC](https://gromacs.bioexcel.eu/t/hbond-calculation/5085/2 "2022-10-21T15:37:11Z")

</div>

Hi,

The message you got from gmx hhond say that it does not find any donor or acceptor, that mean that gmx hbond does not recognize the atoms of the two groups neither as donor nor as acceptor. And that is the reason why it does not find the H-bond).  
gmx hbond recognizes OH and NH groups as donors, O is an acceptor always, N is an acceptor by default, but this can be switched using `-nitacc`.  
and the two groups for analysis must be either identical or non-overlapping.  
Are those conditions you are working with? Are you using a standard implementation of an atomistic force field ?

\Alessandra

---

<div class="post-metadata">

**Author:** ![nano](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@nano](https://gromacs.bioexcel.eu/u/nano)\
**Post date:** [October 21, 2022, 4:27pm UTC](https://gromacs.bioexcel.eu/t/hbond-calculation/5085/3 "2022-10-21T16:27:41Z")

</div>

Note that the angle definition in VMD is different from that in Gromacs _gmx hbond_.

---

<div class="post-metadata">

**Author:** ![Ema2022](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@Ema2022](https://gromacs.bioexcel.eu/u/Ema2022)\
**Post date:** [July 14, 2025, 8:41am UTC](https://gromacs.bioexcel.eu/t/hbond-calculation/5085/4 "2025-07-14T08:41:10Z")

</div>

Hi,

My system contains PEG chains, and I’d like to analyze hydrogen bond formation between the terminal hydroxyl groups of PEG and the oxygen atoms of a polymer. To do this, I’m planning to define an index group that includes both hydroxyl groups (each with one oxygen and two hydrogen atoms).

Would it be correct to group the two terminal hydroxyl groups together (i.e., both O and their corresponding H atoms) into a single group in the index file for this analysis?

Thanks in advance!

a O1 & r PEG | a H1 & r PEG | a O10 & r PEG | a H38 & r PEG  
a O & r PSM
