Lightweight Python package to calculate translational vector and rotational matrix between two sets of 3D coordinates
Project description
Description
transrot is a lightweight Python package to calculate the translation vector and rotational matrix between two sets of 3D coordinates. This transformation can be applied to another set of coordinates
Installation
pip install transrot
How To?
from transrot import TransRot
import numpy as np
# Get your (n, 3) array of coordinates
coords1 = np.random.random((5, 3))
coords2 = np.random.random((5, 3))
coords3 = np.random.random((5, 3))
# Initialize the class
transformation = TransRot(
coords1=coords1,
coords2=coords2
)
# Calculate rotational matrix and translational vector that aligns coords1 to coords2
transformation.fit()
# Transform a set of coordinates with the calculated transformation
transformed_coords = transformation.transform(coords3)
Issues
If you have found a bug, please open an issue on the GitHub Issues.
Funding
This project received funding from Marie Skłodowska-Curie Actions. It was developed in the Computational Biophysics Group of Saarland University.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
transrot-0.0.1.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file transrot-0.0.1.tar.gz
.
File metadata
- Download URL: transrot-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ffc2413c2994a25df0f403009980d4fb1e054e81f64a425050e7ec4bec6d480 |
|
MD5 | c14566fec912775da12d4e92268d3fa5 |
|
BLAKE2b-256 | 543ec2c839aa421176df1c93928997551ef0d858a273a0c4c0f25300d59f4bb8 |
File details
Details for the file transrot-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: transrot-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6ee536e1b251f75399c7bacac56d43682c2c661b2ac1fa789ddc61a2c566be |
|
MD5 | 902fd29b4ffdfd912a205190224898fd |
|
BLAKE2b-256 | 5d82b480144d8c26d5572e692e290be874334e13d7a58f9f4e3e15986fa23545 |