# Generate Histogram of HBonds

**URL:** <https://gromacs.bioexcel.eu/t/generate-histogram-of-hbonds/8461>\
**Category:** User discussions\
**Tags:** analysis-tools, gmx-hbond\
**Created:** [February 28, 2024, 6:21pm UTC](https://gromacs.bioexcel.eu/t/generate-histogram-of-hbonds/8461 "2024-02-28T18:21:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TGaziri](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/tgaziri/32/5191_2.png) [@TGaziri](https://gromacs.bioexcel.eu/u/TGaziri)\
**Post date:** [February 28, 2024, 6:21pm UTC](https://gromacs.bioexcel.eu/t/generate-histogram-of-hbonds/8461/1 "2024-02-28T18:21:56Z")

</div>

GROMACS version: 2022  
GROMACS modification: No

Hi,

I need to generate a histogram with the number of water molecules making 1, 2, 3 or 4 hydrogen bonds with other water molecules. I thought about using `gmx hbond` for this, but as far as I know there is no flag to generate such histogram. Is there any way of doing it with `gmx hbond` or do I have to do it from scratch - write a program to calculate the distances and angles between hydrogen donors and acceptors and use it to determine the number of molecules making each number of bonds?

Thanks
