From 79fc4f13447c16a502a2111c067665934b7f6515 Mon Sep 17 00:00:00 2001 From: foxtran <39676482+foxtran@users.noreply.github.com> Date: Sat, 1 Feb 2025 04:43:55 +0100 Subject: [PATCH] Fix exit condition in calc_distances --- src/main/geometry.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/geometry.f90 b/src/main/geometry.f90 index f813439b1..222189857 100644 --- a/src/main/geometry.f90 +++ b/src/main/geometry.f90 @@ -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)