Fixed circular import
This commit is contained in:
parent
dffd06d3c0
commit
218574d50c
@ -120,7 +120,7 @@ def gr(
|
|||||||
|
|
||||||
|
|
||||||
def distance_distribution(
|
def distance_distribution(
|
||||||
atoms: CoordinateFrame, bins: Optional[int, ArrayLike]
|
atoms: CoordinateFrame, bins: Union[int, ArrayLike]
|
||||||
) -> NDArray:
|
) -> NDArray:
|
||||||
connection_vectors = atoms[:-1, :] - atoms[1:, :]
|
connection_vectors = atoms[:-1, :] - atoms[1:, :]
|
||||||
connection_lengths = (connection_vectors**2).sum(axis=1) ** 0.5
|
connection_lengths = (connection_vectors**2).sum(axis=1) ** 0.5
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
from __future__ import annotations
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union, TYPE_CHECKING
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from numpy.typing import ArrayLike, NDArray
|
from numpy.typing import ArrayLike, NDArray
|
||||||
@ -7,7 +8,8 @@ from numpy.typing import ArrayLike, NDArray
|
|||||||
from itertools import product
|
from itertools import product
|
||||||
|
|
||||||
from .logging import logger
|
from .logging import logger
|
||||||
from .coordinates import CoordinateFrame
|
if TYPE_CHECKING:
|
||||||
|
from mdevaluate.coordinates import CoordinateFrame
|
||||||
|
|
||||||
|
|
||||||
def pbc_diff(
|
def pbc_diff(
|
||||||
@ -70,7 +72,7 @@ def pbc_diff_tric(coords_a: NDArray, coords_b: NDArray, box: NDArray) -> NDArray
|
|||||||
|
|
||||||
|
|
||||||
def pbc_dist(
|
def pbc_dist(
|
||||||
atoms_a: CoordinateFrame, atoms_b: CoordinateFrame, box: Optional[NDArray] = None
|
atoms_a: NDArray, atoms_b: NDArray, box: Optional[NDArray] = None
|
||||||
) -> ArrayLike:
|
) -> ArrayLike:
|
||||||
return ((pbc_diff(atoms_a, atoms_b, box) ** 2).sum(axis=1)) ** 0.5
|
return ((pbc_diff(atoms_a, atoms_b, box) ** 2).sum(axis=1)) ** 0.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user