# Apparent hbond bug with -nomerge flag

**URL:** <https://gromacs.bioexcel.eu/t/apparent-hbond-bug-with-nomerge-flag/7282>\
**Category:** User discussions\
**Created:** [September 27, 2023, 5:19pm UTC](https://gromacs.bioexcel.eu/t/apparent-hbond-bug-with-nomerge-flag/7282 "2023-09-27T17:19:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ga01](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@ga01](https://gromacs.bioexcel.eu/u/ga01)\
**Post date:** [September 27, 2023, 5:19pm UTC](https://gromacs.bioexcel.eu/t/apparent-hbond-bug-with-nomerge-flag/7282/1 "2023-09-27T17:19:38Z")

</div>

GROMACS version: 21.5  
GROMACS modification: No

Hi,  
I recently used gmx hbond (echo -e “1\n1” | gmx hbond -f mdtrj.xtc -s mdtrj.tpr -hbm -hbn -nomerge) to identify hydrogen bonds in a trajectory (protein vs. protein), and I noticed that in some trajectories the hydrogen bonds patterns I obtain with hbond (using hbmap.xpm and the indexing of hbond.ndx files) are sometimes radically different from my own calculations, which are based on the pdb coordinates of the trajectory.

It seems that the problem is caused by setting the -nomerge flag (and removing it appear to fix the problem, and result in realistic patterns), my guess is that having it sometimes causes inconsistencies between the hydrogen bond indexing of the hbond.ndx file and the hbmap.xpm file. I wonder whether this is a known issue (and was fixed with newer gmx versions)?

Kind regards,  
George

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [October 3, 2023, 8:05am UTC](https://gromacs.bioexcel.eu/t/apparent-hbond-bug-with-nomerge-flag/7282/2 "2023-10-03T08:05:34Z")

</div>

Thank you. Yes, we have discovered multiple problems with `hbond`. The bug you reported was addressed in 2022.3 ([https://manual.gromacs.org/current/release-notes/2022/2022.3.html#prevent-hbond-merging-in-gmx-hbond-for-non-compatible-options](https://manual.gromacs.org/current/release-notes/2022/2022.3.html#prevent-hbond-merging-in-gmx-hbond-for-non-compatible-options)).

In release 2024 there will be a new `hbond2` tool, which will be easier to support, but also with somewhat limited features.
