Fast algorithms for MD trajectories
Project description
Rust Simulation Tools
Fast, numerically stable MD trajectory processing implemented in Rust with a clean python API.
Installable via pip, integrates smoothly with MDAnalysis or mdtraj, and ships with tests.
Installation
pip install rust-simulation-tools
Features
- ⚡ Fast: Rust implementation with SIMD optimizations
- 🎯 Accurate: Numerically stable Kabsch alignment and fragment-based unwrapping
- 🧪 Well tested: Comprehensive test suite with >80% coverage
- 🧩 Easy integration: Works directly with MDAnalysis selections/indices
Usage
import MDAnalysis as mda
from rust_simulation_tools import kabsch_align
# Load trajectory
u = mda.Universe("topology.pdb", "trajectory.dcd")
# Select alignment atoms
align_selection = u.select_atoms("backbone")
align_indices = align_selection.indices
# Get coordinates
reference = u.atoms.positions.copy()
trajectory = np.array([ts.positions for ts in u.trajectory])
# Align
aligned = kabsch_align(trajectory, reference, align_indices)
API Reference
kabsch_align(
trajectory: np.ndarray, # float, shape [n_frames, n_atoms, 3]
reference: np.ndarray, # float, shape [n_atoms, 3]
align_idx: np.ndarray # int, shape [n_alignment_atoms]
) -> np.ndarray # float, shape [n_frames, n_atoms, 3]
unwrap_system(
trajectory: np.ndarray, # float, shape [n_frames, n_atoms, 3]
box_dimensions: np.ndarray, # float, shape [n_frames, 3]
fragment_idx: np.ndarray # int, shape [n_atoms]
) -> np.ndarray # float, shape [n_frames, n_atoms, 3]
Development
# Clone repository
git clone https://github.com/msinclair-py/rust-simulation-tools.git
cd rust-simulation-tools
# Install development dependencies
pip install maturin pytest pytest-cov numpy
# Build and install in development mode
maturin develop --release
# Install with pip
pip install target/wheels/name-of-package.whl
# Run tests
pytest tests/ -v --cov
License
MIT License
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rust_simulation_tools-0.1.4.tar.gz.
File metadata
- Download URL: rust_simulation_tools-0.1.4.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd478b6536d74cd13ff0a56c57726498a88c8a0bea8393c96909509f3040a315
|
|
| MD5 |
ed9956c5c856a3f658bc423b3712165c
|
|
| BLAKE2b-256 |
ef202254e6f57596498bcdadace61c464a36ee0a9d3bd42629f77ac820067f1d
|
File details
Details for the file rust_simulation_tools-0.1.4-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 190.7 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740de8c5d3515538448beb036fed6e2abaa4a1ef1c48818a331d2c778194fe16
|
|
| MD5 |
9db4c2bffefea0041c734a3569d7d4e4
|
|
| BLAKE2b-256 |
1337fa28ef0071143094265e55e6f34f90624cd837bfc818c12286870373ac5f
|
File details
Details for the file rust_simulation_tools-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 305.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04b5d03c0f933a7269109a875d03caa2eb2cd73c706c6adf5ab705a5001cfd6b
|
|
| MD5 |
c2e28a64228c1563581ee631174d3458
|
|
| BLAKE2b-256 |
42682aae337129c9a843b2bc4216994a6bb871ebf9befa60f3a3bdbdea6c526e
|
File details
Details for the file rust_simulation_tools-0.1.4-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 257.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a794caf377c29d6ba09c4b9e37f4e28a3c8aa1b70d99f9015c7f8944db7667aa
|
|
| MD5 |
56e090b10bce6a2c6b2bc9d3fbb1b6dd
|
|
| BLAKE2b-256 |
bdd6a92a2abbd21a12010819b1c61299acbe6a061ca1528a7e04b711a37696e8
|
File details
Details for the file rust_simulation_tools-0.1.4-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 189.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc57aba2ce5e46a449a73261998b4deb068c78d616456ef7cd22751938be5a80
|
|
| MD5 |
c6bf272219c35cbdfa506982ae78cc95
|
|
| BLAKE2b-256 |
bdd77b121181f67175a06072404c73cd031c2009680128c63a490e81e972326d
|
File details
Details for the file rust_simulation_tools-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 304.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca3976d9d4dcaa13e2f20a951f1d33e7ffcad692440a14594dca508a1a467035
|
|
| MD5 |
e3feaa5ed8adb7ff254f01bbdd05ac22
|
|
| BLAKE2b-256 |
c3282852ba8cd0448893f5b871a05e2634ae020a3b180cdd82f5096eb141b61f
|
File details
Details for the file rust_simulation_tools-0.1.4-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 256.2 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e4c2730bde2b2c7cacc0f5baff32932dde336886b91e338308ba5833bfc76b8
|
|
| MD5 |
e9e8a2fa2703821ec2705c326ad7c034
|
|
| BLAKE2b-256 |
ad59199efa89a9ba0a8587da9dd911270e676458250891cfe24078b6d89eaadc
|
File details
Details for the file rust_simulation_tools-0.1.4-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 189.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c032b1ec9704b320a220ba4438b28d5326606f57ce2368876da3b6af82d014ea
|
|
| MD5 |
3bd2dbb427f0a019d638fd9cd3c3509f
|
|
| BLAKE2b-256 |
43af78e4c7c19c713434e62f398f168d384738a3f70c85b36f45359a40bd6438
|
File details
Details for the file rust_simulation_tools-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 304.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d89d3f626f7b0fd013bf7008d7b9a20dd466b16c44eddf1be55f847d0e8faf8f
|
|
| MD5 |
4e97cdd47ed9577da57a077e7ecd3fa8
|
|
| BLAKE2b-256 |
ac8b1e528b579fabc816cdc8e8495d676759bd7c2beb528035acbd6dcd028458
|
File details
Details for the file rust_simulation_tools-0.1.4-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 256.2 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eac6da16372704d3bab0689ea46debe414294213adbf5eb32c6181be8fb3795
|
|
| MD5 |
ef01605b89d8327d312280e44b4e3a7e
|
|
| BLAKE2b-256 |
36069638a54a2e3d5464e51bc253be378010940765b150a5a757b509ccc5f782
|
File details
Details for the file rust_simulation_tools-0.1.4-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 189.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
321afabbf6a63eb7bad6696ed6c788f44ad6c97a80174fc4b9c677953046bf4c
|
|
| MD5 |
1548974366576bfd5a8859360ee097cb
|
|
| BLAKE2b-256 |
a1d227a279f7b570f088b08acef1cd67984c4fa844c2ca0fa8393459f73417ab
|
File details
Details for the file rust_simulation_tools-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 305.0 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0b19b229d0c68ea90533efa1fb4da41d424e4f5b8beb0ebcbb614eb4d351dcb
|
|
| MD5 |
12604af8f12894d6b8e51a8ff9f37fa6
|
|
| BLAKE2b-256 |
d4ffb007b526d61b814cf8f8a70f92670ff9f21c0f4a61e5eaae83283cfec5af
|
File details
Details for the file rust_simulation_tools-0.1.4-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.1.4-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 256.5 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0b26e61758d94a1118803db5da0248485d2e748977766279e773ee9c068dd08
|
|
| MD5 |
4ff0eedd7d796e79650ac94c7151662d
|
|
| BLAKE2b-256 |
4a2dd87c9bbe8bdbac48f8362b9eaf846e095128d3e494add256942ccef67742
|