Skip to content

Commit

Permalink
Fix exit condition in calc_distances (#1168)
Browse files Browse the repository at this point in the history
Signed-off-by: Igor S. Gerasimov <[email protected]>
  • Loading branch information
foxtran authored Feb 10, 2025
1 parent 3bb036e commit 945d7e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/geometry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ subroutine calc_distances(n,at,xyz,bond,maxdist,ndist,dist,id, &
jat = at(j)
r = sqrt(sum((xyz(:,i)-xyz(:,j))**2))
if (bond(j,i).gt.0) then
m = m+1
if (m.ge.maxdist) exit get_dist
m = m+1
ndel(iat,jat) = ndel(iat,jat)+1
maxdel(iat,jat) = max(maxdel(iat,jat),r)
mindel(iat,jat) = min(mindel(iat,jat),r)
Expand Down

0 comments on commit 945d7e6

Please sign in to comment.