Added optional argument box to pbc_points
This commit is contained in:
parent
b1cb9d99cf
commit
76db85d628
@ -8,6 +8,7 @@ from numpy.typing import ArrayLike, NDArray
|
||||
from itertools import product
|
||||
|
||||
from .logging import logger
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from mdevaluate.coordinates import CoordinateFrame
|
||||
|
||||
@ -179,6 +180,7 @@ def nojump(frame: CoordinateFrame, usecache: bool = True) -> CoordinateFrame:
|
||||
|
||||
def pbc_points(
|
||||
coordinates: CoordinateFrame,
|
||||
box: Optional[NDArray] = None,
|
||||
thickness: Optional[float] = None,
|
||||
index: bool = False,
|
||||
shear: bool = False,
|
||||
@ -191,7 +193,8 @@ def pbc_points(
|
||||
index=True also returns the indices with indices of images being their
|
||||
original values.
|
||||
"""
|
||||
box = coordinates.box
|
||||
if box is None:
|
||||
box = coordinates.box
|
||||
if shear:
|
||||
box[2, 0] = box[2, 0] % box[0, 0]
|
||||
# Shifts the box images in the other directions if they moved more than
|
||||
|
Loading…
Reference in New Issue
Block a user