Structure.rigid_transform#
- Structure.rigid_transform(rotation_matrix=None, translation=None, use_geometric_center=False)[source]#
Performs a rigid transform of internal structure coordinates.
- Parameters:
- rotation_matrixNDArray, optional
The rotation matrix to apply to the coordinates, defaults to identity.
- translationNDArray, optional
The vector to translate the coordinates by, defaults to 0.
- use_geometric_centerbool, optional
Whether to use geometric or coordinate center.
- Returns:
- Structure
The transformed instance of
Structure
.
Examples
>>> from importlib_resources import files >>> from tme import Structure >>> from tme.matching_utils import get_rotation_matrices >>> fname = str(files("tests.data").joinpath("Structures/5khe.cif")) >>> structure = Structure.from_file(filename=fname) >>> structure.rigid_transform( >>> rotation_matrix = get_rotation_matrices(60)[2], >>> translation = (0, 1, -5) >>> )