# When I run hbond, an error occurs in the step "Merging hbonds with Acceptor and Donor swapped."

**URL:** <https://gromacs.bioexcel.eu/t/when-i-run-hbond-an-error-occurs-in-the-step-merging-hbonds-with-acceptor-and-donor-swapped/9488>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [June 24, 2024, 6:39am UTC](https://gromacs.bioexcel.eu/t/when-i-run-hbond-an-error-occurs-in-the-step-merging-hbonds-with-acceptor-and-donor-swapped/9488 "2024-06-24T06:39:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![D2390](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@D2390](https://gromacs.bioexcel.eu/u/D2390)\
**Post date:** [June 24, 2024, 6:39am UTC](https://gromacs.bioexcel.eu/t/when-i-run-hbond-an-error-occurs-in-the-step-merging-hbonds-with-acceptor-and-donor-swapped/9488/1 "2024-06-24T06:39:27Z")

</div>

GROMACS version:gromacs2023  
GROMACS modification: Yes/No  
Here post your question  
The server is using 200g of RAM, there shouldn’t be an out of memory problem, I used the command submitted by sbatch：  
#!/bin/bash  
#SBATCH -J gromacs2023  
#SBATCH -p amd  
#SBATCH -N 1  
#SBATCH --ntasks-per-node=128  
#SBATCH --mem=200G

module purge  
#module load compiler/intel/2017.5.239  
#module load mpi/intelmpi/2017.4.239  
#module load mpi/hpcx/2.4.1/intel-2017.5.239  
#module load apps/gromacs/2019.5/hpcx-2.4.1-intel2017  
module load compiler/intel-compiler/2021.3.0  
module load mpi/intelmpi/2021.3.0  
module load apps/cmake/3.26.3  
module load compiler/gcc/9.3.0  
module load mathlib/fftw/intelmpi/3.3.9\_single  
module load apps/gromacs/2023/cpu-intelmpi-intel2021

echo -e “1\n13” | gmx\_mpi hbond -f md.xtc -s md.tpr -n index.ndx -num -hbm -hbn  
I successfully ran mdrun for 25ns, generating files: md.tpr, md.xtc. Here is the command I executed:  
Select a group: Selected 1: ‘Protein’  
Select a group: Selected 13: ‘MOL’  
Checking for overlap in atoms between Protein and MOL  
Calculating hydrogen bonds between Protein (11283 atoms) and MOL (65 atoms)  
Found 982 donors and 2019 acceptors  
Making hbmap structure…done.  
Reading frame 0 time 0.000  
Will do grid-search on 25x25x25 grid, rcut=0.34999999  
Frame loop parallelized with OpenMP using 128 threads.  
Reading frame 12000 time 24000.000  
Found 52 different hydrogen bonds in trajectory  
Found 114 different atom-pairs within hydrogen bonding distance  
Merging hbonds with Acceptor and Donor swapped  
325/982[comput24:41390:0:41390] Caught signal 11 (Segmentation fault: address not mapped to object at address (nil))  
==== backtrace (tid: 41390) ====  
0 0x0000000000014070 .annobin\_sigaction.c() sigaction.c:0  
1 0x0000000000fffbc3 \_INTERNALb7fb3a0b::do\_merge() gmx\_hbond.cpp:0  
2 0x0000000000fff4c9 \_INTERNALb7fb3a0b::merge\_hb() gmx\_hbond.cpp:0  
3 0x0000000000ff7fc5 gmx\_hbond() ???:0  
4 0x0000000000e17207 gmx::CommandLineModuleManager::run() ???:0  
5 0x000000000040aa8a main() ???:0  
6 0x0000000000027453 \_\_libc\_start\_main() ???:0  
7 0x000000000040a929 \_start() ???:0  
/opt/gridview/slurm/spool/slurmd/job15569/slurm\_script: line 20: 41389 Done echo -e “1\n13”  
41390 Segmentation fault (core dumped) | gmx\_mpi hbond -f md.xtc -s md.tpr -n index.ndx -num -hbm -hbn

---

<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:** [June 24, 2024, 12:57pm UTC](https://gromacs.bioexcel.eu/t/when-i-run-hbond-an-error-occurs-in-the-step-merging-hbonds-with-acceptor-and-donor-swapped/9488/2 "2024-06-24T12:57:14Z")

</div>

The `gmx hbond` tool was rewritten in GROMACS 2024 and the old version has been deprecated. So, I’m afraid there will almost certainly not be any bug fixes to the 2023 version. However, there are still some features that have not yet been implemented. It would be good to hear if the 2024 version works, and/or what features you are missing from it.
