Skip to content

Commit

Permalink
adjusted fold coordinates method so that the fractional coordinates o…
Browse files Browse the repository at this point in the history
…f all atoms will have a value between 0 and 1
  • Loading branch information
ChiCheng45 committed Mar 21, 2024
1 parent b59b0ae commit d55503a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MDANSE/Extensions/fold_coordinates.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ def fold_coordinates(
by = box_coords[i,j,1]
bz = box_coords[i,j,2]

while bx < -0.5:
while bx < 0.0:
bx += 1.0

while by < -0.5:
while by < 0.0:
by += 1.0

while bz < -0.5:
while bz < 0.0:
bz += 1.0

while bx > 0.5:
while bx >= 1.0:
bx -= 1.0

while by > 0.5:
while by >= 1.0:
by -= 1.0

while bz > 0.5:
while bz >= 1.0:
bz -= 1.0

box_coords[i,j,0] = bx
Expand Down

0 comments on commit d55503a

Please sign in to comment.