Fixed shear correction in pbc_points
This commit is contained in:
parent
5aec83b358
commit
22287d167d
@ -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]]
|
||||
|
Loading…
Reference in New Issue
Block a user