ferrodispcalc.compute package#
Submodules#
ferrodispcalc.compute.backend module#
ferrodispcalc.compute.pybackend module#
- class ferrodispcalc.compute.pybackend.PyCompute(input, type_map: list[str] = None, prefix: str = None)[source]#
Bases:
ComputeBackend
- get_local_lattice(select: list[int], nl: ndarray) ndarray [source]#
Calculates the local lattice vectors for each unit cell.
This method determines the local lattice by classifying neighbor atoms based on their position relative to a central atom and averaging their displacement vectors.
- Parameters:
select – A list of frame indices to include in the calculation.
nl – The neighbor list array (n_unitcells, 9), with the first column being the central atom and the rest being its neighbors. Indices are 1-based.
- Returns:
A NumPy array of shape (nframes, n_unitcells, 9) containing the flattened local lattice vectors (ax,ay,az,bx,by,bz,cx,cy,cz).