Skip to content

Commit

Permalink
Fix exit condition in calc_distances
Browse files Browse the repository at this point in the history
  • Loading branch information
foxtran authored Feb 1, 2025
1 parent c3cfd38 commit 79fc4f1
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 @@ -380,8 +380,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 79fc4f1

Please sign in to comment.