From d55503ae616af481d2c3381091cb718099b4d55b Mon Sep 17 00:00:00 2001 From: Chi Cheng Date: Thu, 21 Mar 2024 15:48:34 +0000 Subject: [PATCH] adjusted fold coordinates method so that the fractional coordinates of all atoms will have a value between 0 and 1 --- MDANSE/Extensions/fold_coordinates.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MDANSE/Extensions/fold_coordinates.pyx b/MDANSE/Extensions/fold_coordinates.pyx index 4d882fbcd2..745f82dd0c 100644 --- a/MDANSE/Extensions/fold_coordinates.pyx +++ b/MDANSE/Extensions/fold_coordinates.pyx @@ -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