# H-bond calculation

**URL:** <https://gromacs.bioexcel.eu/t/h-bond-calculation/7124>\
**Category:** User discussions\
**Tags:** gmx-hbond\
**Created:** [September 2, 2023, 7:16pm UTC](https://gromacs.bioexcel.eu/t/h-bond-calculation/7124 "2023-09-02T19:16:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samapika](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@samapika](https://gromacs.bioexcel.eu/u/samapika)\
**Post date:** [September 2, 2023, 7:16pm UTC](https://gromacs.bioexcel.eu/t/h-bond-calculation/7124/1 "2023-09-02T19:16:39Z")

</div>

GROMACS version:2020.2  
GROMACS modification: No  
I am calculating the number of H-bond and ACF of H-bond using gmx hbond command. I have a bilayer which I have divided into bins along the z axis as: Interface region, Hydrophobic core and Far interface region. In each bin I am calculating h-bond between two groups which I have filtered using gmx select command and created their indices. This index I have used as input. I am using the following command:  
hbond -f …/production.xtc -s …/production.tpr -n FR1\_DMS\_water.ndx -ac FR1.xvg -b 0 -e 50  
but the error displays:Fatal error:  
Partial overlap between groups ‘resname’ and ‘resname’

How can I resolve this??

---

<div class="post-metadata">

**Author:** ![samapika](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@samapika](https://gromacs.bioexcel.eu/u/samapika)\
**Post date:** [September 3, 2023, 12:11am UTC](https://gromacs.bioexcel.eu/t/h-bond-calculation/7124/2 "2023-09-03T00:11:10Z")

</div>

There is no overlap between two molecules. I crosschecked the .gro file. Also the elements are differently named. Please help me understanding the error.

---

<div class="post-metadata">

**Author:** ![FarzaneJP](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/farzanejp/32/1211_2.png) [@FarzaneJP](https://gromacs.bioexcel.eu/u/FarzaneJP)\
**Post date:** [September 3, 2023, 12:43pm UTC](https://gromacs.bioexcel.eu/t/h-bond-calculation/7124/3 "2023-09-03T12:43:05Z")

</div>

Please define **different groups** in your **index file** (\*.ndx) and make sure you’re using the latest GROMACS version, **2023.2**. Here is a discussion that might be helpful to you:

> [@Hbond for docked protein-protein complex](https://gromacs.bioexcel.eu/t/hbond-for-docked-protein-protein-complex/3529):
>
> GROMACS version: 2020.2 GROMACS modification: No Hi, I have a docked protein-protein complex and performed md simulations. I want to make a hydrogen bond study between these 2 proteins using gmx hbond ( gmx hbond -f md.xtc -s md.tpr -num hbnum\_Pro-Pro.xvg and issuing Protein , Protein (same atom numbers for both)) however, I believe this way I’m looking at intraprotein H bonds instead of interprotein H bonds, right? The md simulation was run using a pdb file with the two protein chains in it…

---

<div class="post-metadata">

**Author:** ![samapika](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@samapika](https://gromacs.bioexcel.eu/u/samapika)\
**Post date:** [September 4, 2023, 9:18am UTC](https://gromacs.bioexcel.eu/t/h-bond-calculation/7124/4 "2023-09-04T09:18:06Z")

</div>

This is the index file.  
[IW]  
15241  
15242  
15243  
15261  
15262  
15263  
15525  
15526  
15527  
15657  
15658  
15659  
16001  
16002  
16003  
16049  
16050  
16051  
16229  
16230  
16231  
16385  
16386  
16387  
…[IDMS]  
15473  
15474  
15475  
16233  
16234  
16235  
16309  
16310  
16311  
16313  
16314  
16315  
16613  
16614  
16615  
16797  
16798  
16799  
17177  
17178  
17179  
17181  
17182  
~/Downloads/gromacs-2020.2/build\_new/bin/gmx hbond -f ../../production\_500ps.xtc -s ../../production\_500ps.tpr -ac hbond\_idms.xvg -b 450 -e 500 -n try.ndx  
:-) GROMACS - gmx hbond, 2020.2 (-:

```
                        GROMACS is written by:
 Emile Apol Rossen Apostolov Paul Bauer Herman J.C. Berendsen
Par Bjelkmar Christian Blau Viacheslav Bolnykh Kevin Boyd    

```

Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray  
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang  
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis  
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson  
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund  
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall  
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov  
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen  
Christian Wennberg Maarten Wolf Artem Zhmurov  
and the project leaders:  
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.  
Copyright (c) 2001-2019, The GROMACS development team at  
Uppsala University, Stockholm University and  
the Royal Institute of Technology, Sweden.  
check out [http://www.gromacs.org](http://www.gromacs.org) for more information.

GROMACS is free software; you can redistribute it and/or modify it  
under the terms of the GNU Lesser General Public License  
as published by the Free Software Foundation; either version 2.1  
of the License, or (at your option) any later version.

GROMACS: gmx hbond, version 2020.2  
Executable: /home/user/Downloads/gromacs-2020.2/build\_new/bin/gmx  
Data prefix: /home/user/Downloads/gromacs-2020.2 (source tree)  
Working dir: /DATA2/DMSO+DMPC/simulation/Slipid/25%/gromacs-2020.2/new\_pack/npt/production/production\_500ps/h-bonds/generation\_of\_IW\_IDMSO  
Command line:  
gmx hbond -f ../../production\_500ps.xtc -s ../../production\_500ps.tpr -ac hbond\_idms.xvg -b 450 -e 500 -n try.ndx

Reading file ../../production\_500ps.tpr, VERSION 2020.2 (single precision)  
Specify 2 groups to analyze:  
Group 0 ( IW) has 393 elements  
Group 1 ( IDMS) has 60 elements  
Select a group: 1  
Selected 1: ‘IDMS’  
Select a group: 0  
Selected 0: ‘IW’  
Checking for overlap in atoms between IDMS and IW

* * *

Program: gmx hbond, version 2020.2  
Source file: src/gromacs/gmxana/gmx\_hbond.cpp (line 2736)

Fatal error:  
Partial overlap between groups ‘IDMS’ and ‘IW’

## For more information and tips for troubleshooting, please check the GROMACS website at [Common Errors — GROMACS webpage https://www.gromacs.org documentation](http://www.gromacs.org/Documentation/Errors)
