nanover.utilities.transforms module

class nanover.utilities.transforms.StructureAlignment(*, atoms: list[int], positions: NDArray)

Bases: object

calculate_transform_to_framedata(framedata: FrameData)
calculate_transform_to_positions(positions: NDArray)
calculate_transform_to_universe(universe: Universe)
classmethod from_atom_group(atom_group: AtomGroup)
classmethod from_atoms_and_framedata(atoms: list[int], framedata: FrameData)
class nanover.utilities.transforms.Transform(*, local_to_parent: NDArray, parent_to_local: NDArray)

Bases: object

Convenience wrapper around transformation matrix.

classmethod from_local_to_parent_matrix(local_to_parent: NDArray)
classmethod from_parent_to_local_matrix(parent_to_local: NDArray)
classmethod from_state_cursor(cursor)
classmethod from_state_transform(transform: Iterable[float])
classmethod from_translation(translation: Iterable[float])
classmethod identity()
inverted()
property local_to_parent_matrix
property parent_to_local_matrix
point_local_to_parent(point)
point_parent_to_local(point)
points_local_to_parent(points)
points_parent_to_local(points)
to_state_transform() Sequence[float]
nanover.utilities.transforms.find_transformation_between_point_patterns(start_points: NDArray, final_points: NDArray)

Return the 4x4 transformation matrix that best maps the start points to the final points.

nanover.utilities.transforms.matrix_from_state_transform(transform: Iterable[float])
nanover.utilities.transforms.state_transform_from_matrix(matrix: NDArray) Sequence[float]
nanover.utilities.transforms.unpack_partial_state_transform(transform: Iterable[float])

Pad partial state transform iterable up to full length with components of identity state transform.