Skip to content
Snippets Groups Projects
Commit cabeb088 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

Handle the case when atoms are on top of each other

Do the same as NACCESS: assign 0.0
parent 5600cf71
Branches
No related tags found
No related merge requests found
...@@ -203,6 +203,11 @@ Real GetAtomAccessibilityNACCESS(Real x_pos, Real y_pos, Real z_pos, ...@@ -203,6 +203,11 @@ Real GetAtomAccessibilityNACCESS(Real x_pos, Real y_pos, Real z_pos,
Real a = x_pos - x[i]; Real a = x_pos - x[i];
Real b = y_pos - y[i]; Real b = y_pos - y[i];
Real c = a*a + b*b; Real c = a*a + b*b;
if(c == Real(0.0)) {
return 0.0;
}
dx[i] = a; dx[i] = a;
dy[i] = b; dy[i] = b;
dsqr[i] = c; dsqr[i] = c;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment