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]]