Skip to content

Commit

Permalink
Modify analaze_movie to handle 1 particle systems.
Browse files Browse the repository at this point in the history
e.g if you want to analyze 1 particle moving on 1D potential
just select the same index 1 to indicate a "bond"
  • Loading branch information
danielhollas committed Apr 20, 2018
1 parent 8011f4c commit 5528862
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions UTILS/analyze_movie.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ real*8 function get_distance( at1, at2, boxx, boxy, boxz)
real*8, intent(in) :: boxx, boxy, boxz
real*8 :: dx, dy, dz, temp

dx = x(at1) - x(at2)
dy = y(at1) - y(at2)
dz = z(at1) - z(at2)
if (at1.eq.at2)then
dx = x(at1)
dy = y(at1)
dz = z(at1)
else
dx = x(at1) - x(at2)
dy = y(at1) - y(at2)
dz = z(at1) - z(at2)

end if
if (boxx.gt.0)then
dx = dx - boxx * nint(dx/boxx)
dy = dy - boxy * nint(dy/boxy)
Expand Down

0 comments on commit 5528862

Please sign in to comment.