# Histogram of Hbond

**URL:** <https://gromacs.bioexcel.eu/t/histogram-of-hbond/2082>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [May 2, 2021, 9:43pm UTC](https://gromacs.bioexcel.eu/t/histogram-of-hbond/2082 "2021-05-02T21:43:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://gromacs.bioexcel.eu/u/Alex)\
**Post date:** [May 2, 2021, 9:43pm UTC](https://gromacs.bioexcel.eu/t/histogram-of-hbond/2082/1 "2021-05-02T21:43:18Z")

</div>

GROMACS version: 2020  
GROMACS modification: No

Hello all,  
I wonder how to calculate the histogram (binning) of the hydrogen bonds? Something similar to what the gmx density -number does for counting the atom’s population according the x, y, z.  
I am just not sure how close is what the gmx hbond -hbm gives as a map to what I desire.

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:** [May 4, 2021, 9:53am UTC](https://gromacs.bioexcel.eu/t/histogram-of-hbond/2082/2 "2021-05-04T09:53:38Z")

</div>

Hi,  
gmx hbond -hbm provides a xpm map having in x the simulation time and y the index number of hydrogen bond. The map tells you if you have or not a specific hydrogen bond at that specific point in time.  
Is this what you want?  
Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://gromacs.bioexcel.eu/u/Alex)\
**Post date:** [May 5, 2021, 5:19am UTC](https://gromacs.bioexcel.eu/t/histogram-of-hbond/2082/3 "2021-05-05T05:19:47Z")

</div>

Hi,  
Thanks.  
Then it seems that the gmx hbond -hbm does not directly give what I am looking for. I am interested in the spatial (x,y,z) distribution of the hydrogen bonds, so that I would be able to count numerically that how many hydrogen bonds exist in a bin such as \Delta \text{x} \times \Delta \text{y} \times \Delta \text{z}.  
So, any comment is greatly appreciated.

Regards
