# Floating Point Exception at H-Bond Analysis

**URL:** <https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477>\
**Category:** User discussions\
**Created:** [March 1, 2024, 9:16am UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477 "2024-03-01T09:16:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![harunalcakan](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@harunalcakan](https://gromacs.bioexcel.eu/u/harunalcakan)\
**Post date:** [March 1, 2024, 9:16am UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/1 "2024-03-01T09:16:57Z")

</div>

GROMACS version: 2023.3  
GROMACS modification:  
Here post your question

Dear all,

I’m getting this error while performing hydrogen bond analysis of the MD trajectory of my complex. I have browsed this error in the forum but could not get any clear solution.

```auto
                      :-) GROMACS - gmx hbond, 2023.3 (-:

Command line:
  gmx hbond -f md100ns-best.xtc -s md100ns.tpr -num hbnum.xvg -tu ns

Reading file md100ns.tpr, VERSION 2021.3 (single precision)
Note: file tpx version 122, software tpx version 129
Specify 2 groups to analyze:
Group 0 ( System) has 69491 elements
Group 1 ( Protein) has 4447 elements
Group 2 ( Protein-H) has 2231 elements
Group 3 ( C-alpha) has 274 elements
Group 4 ( Backbone) has 822 elements
Group 5 ( MainChain) has 1095 elements
Group 6 ( MainChain+Cb) has 1350 elements
Group 7 ( MainChain+H) has 1354 elements
Group 8 ( SideChain) has 3093 elements
Group 9 ( SideChain-H) has 1136 elements
Group 10 ( Prot-Masses) has 4447 elements
Group 11 ( non-Protein) has 65044 elements
Group 12 ( Other) has 52 elements
Group 13 ( LIG) has 51 elements
Group 14 ( CLA) has 1 elements
Group 15 ( Water) has 64992 elements
Group 16 ( SOL) has 64992 elements
Group 17 ( non-Water) has 4499 elements
Select a group: 1
Selected 1: 'Protein'
Select a group: 13
Selected 13: 'LIG'
Checking for overlap in atoms between Protein and LIG
Calculating hydrogen bonds between Protein (4447 atoms) and LIG (51 atoms)
Found 400 donors and 793 acceptors
Reading frame 0 time 0.000
Will do grid-search on 20x20x20 grid, rcut=0.34999999
Frame loop parallelized with OpenMP using 16 threads.
Reading frame 110 time 1.100 Floating point exception

```

Any help would be appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [March 1, 2024, 1:49pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/2 "2024-03-01T13:49:46Z")

</div>

Hi!

Looks like a new bug. Could you share your input files? If the trajectory file is too large, you can cut it with `gmx trjconv`

---

<div class="post-metadata">

**Author:** ![harunalcakan](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@harunalcakan](https://gromacs.bioexcel.eu/u/harunalcakan)\
**Post date:** [March 1, 2024, 3:29pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/3 "2024-03-01T15:29:36Z")

</div>

Hi!

Unfortunately, I got the same error while trying to cut my trajectory file. Actually I calculated RMSD, RMSF, Rg and SASA etc. using this trajectory without any problems so I don’t think it’s broken or anything.

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [March 4, 2024, 2:19pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/4 "2024-03-04T14:19:22Z")

</div>

> [@harunalcakan](#):
>
> Unfortunately, I got the same error while trying to cut my trajectory file. Actually I calculated RMSD, RMSF, Rg and SASA etc. using this trajectory without any problems so I don’t think it’s broken or anything.

Can you then upload it somewhere? This is definitely a bug (not necessarily anything wrong with the trajectory, but, apparently, it has some property that is not handled well by some analysis tools). Unfortunately, without a way to reproduce it, we can hardly fix the problem.

If you cannot share the file, perhaps you can run your program under a debugger to get a stack trace? Roughly like this:

```auto
$ gdb --args gmx hbond -f md100ns-best.xtc -s md100ns.tpr -num hbnum.xvg -tu ns
[ten lines of boilerplate printed]
(gdb) run
[GROMACS starts running and crahes]
(gdb) bt
[It will print the trace to the error location here : that's what we need]

```

---

<div class="post-metadata">

**Author:** ![harunalcakan](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@harunalcakan](https://gromacs.bioexcel.eu/u/harunalcakan)\
**Post date:** [March 6, 2024, 6:49pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/5 "2024-03-06T18:49:57Z")

</div>

Here you can find the files in the links below:  
[Link for .tpr](https://drive.google.com/file/d/12mFrFhMdangINohgRw87GiOrYX65uRf5/view?usp=sharing,%20https://drive.google.com/file/d/1NemiGbM987nBjB41pWSBIP9-yzE0T4H3/view?usp=sharing)  
[Link for .xtc](https://drive.google.com/file/d/1NemiGbM987nBjB41pWSBIP9-yzE0T4H3/view?usp=drive_link)

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [March 8, 2024, 12:20am UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/6 "2024-03-08T00:20:40Z")

</div>

you need to give the access to the files-“public”

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [March 8, 2024, 4:02pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/7 "2024-03-08T16:02:15Z")

</div>

Thanks. Interestingly, I don’t observe any crashes with either GROMACS 2023.3 or newer. What is the output of `gmx -version` and how did you install GROMACS?

---

<div class="post-metadata">

**Author:** ![harunalcakan](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@harunalcakan](https://gromacs.bioexcel.eu/u/harunalcakan)\
**Post date:** [March 9, 2024, 12:38pm UTC](https://gromacs.bioexcel.eu/t/floating-point-exception-at-h-bond-analysis/8477/8 "2024-03-09T12:38:34Z")

</div>

Here is the output:

```auto
GROMACS version: 2023.3
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support: disabled
SIMD instructions: AVX2_256
CPU FFT library: fftw-3.3.8-sse2-avx-avx2-avx2_128
GPU FFT library: none
Multi-GPU FFT: none
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /usr/bin/cc GNU 11.4.0
C compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler: /usr/bin/c++ GNU 11.4.0
C++ compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -Wno-cast-function-type-strict -fopenmp -O3 -DNDEBUG
BLAS library: Internal
LAPACK library: Internal

```

Actually, I followed the default installation instruction without changing any parameters.
