From 799e199bb3189afe99a2e3af55348b130b5d2e4b Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Mon, 21 Feb 2022 11:30:03 +0100
Subject: [PATCH] Bugfix: zero-division when atoms with equal vdw radii are on
 top of each other

---
 modules/mol/alg/src/accessibility.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mol/alg/src/accessibility.cc b/modules/mol/alg/src/accessibility.cc
index 309877253..b7f0d841e 100644
--- a/modules/mol/alg/src/accessibility.cc
+++ b/modules/mol/alg/src/accessibility.cc
@@ -270,7 +270,7 @@ Real GetAtomAccessibilityNACCESS(Real x_pos, Real y_pos, Real z_pos,
 
         Real r_diff = z_slice_r - close_atom_z_slice_r;
 
-        if(d[idx] < std::abs(r_diff)) {
+        if(d[idx] <= std::abs(r_diff)) {
           // one circle is inside the other!
           if(r_diff <= Real(0.0)) {
             // the circle of the close atom fully encloses circle of currently
-- 
GitLab