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