From 22287d167d45e336f108841eb3b2918fcc3db076 Mon Sep 17 00:00:00 2001 From: Sebastian Kloth Date: Wed, 18 Oct 2023 15:33:19 +0200 Subject: [PATCH] Fixed shear correction in pbc_points --- mdevaluate/pbc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdevaluate/pbc.py b/mdevaluate/pbc.py index 14eb035..66c903b 100644 --- a/mdevaluate/pbc.py +++ b/mdevaluate/pbc.py @@ -250,11 +250,11 @@ def pbc_points(coordinates, box, thickness=0, index=False, shear=False): originals values. """ if shear: - box[2, 0] = box[2, 0] % box[2, 2] + box[2, 0] = box[2, 0] % box[0, 0] # Shifts the box images in the other directions if they moved more than # half the box length if box[2, 0] > box[2, 2] / 2: - box[2, 0] = box[2, 0] - box[2, 2] + box[2, 0] = box[2, 0] - box[0, 0] grid = np.array( [[i, j, k] for k in [-1, 0, 1] for j in [1, 0, -1] for i in [-1, 0, 1]]