Fast algorithms for MD trajectories
Project description
Rust Simulation Tools
Fast MD trajectory processing and analysis in Rust with a Python API.
Installation
pip install rust-simulation-tools
Features
- Kabsch alignment with SIMD optimizations
- Fragment-based periodic boundary unwrapping
- SASA calculation (Shrake-Rupley with KD-tree acceleration)
- Interaction energy fingerprinting (LJ + electrostatic)
- AMBER file readers (prmtop, inpcrd)
- DCD trajectory reader with streaming support
Quick Examples
Trajectory Alignment
from rust_simulation_tools import kabsch_align
aligned = kabsch_align(trajectory, reference, align_indices)
SASA Calculation
from rust_simulation_tools import calculate_sasa, get_radii_array
radii = get_radii_array(elements) # ['C', 'N', 'O', ...]
result = calculate_sasa(coords, radii, residue_indices)
# result['total'], result['per_atom'], result['per_residue']
AMBER Topology + DCD Trajectory
from rust_simulation_tools import read_prmtop, DcdReader
topo = read_prmtop("system.prmtop")
charges, sigmas, epsilons = topo.charges(), topo.sigmas(), topo.epsilons()
dcd = DcdReader("trajectory.dcd")
for i in range(dcd.n_frames):
coords, box = dcd.read_frame()
Interaction Fingerprints
from rust_simulation_tools import compute_fingerprints, read_prmtop
topo = read_prmtop("system.prmtop")
resmap_indices, resmap_offsets = topo.build_resmap()
lj_fp, es_fp = compute_fingerprints(
positions, topo.charges(), topo.sigmas(), topo.epsilons(),
resmap_indices, resmap_offsets, binder_indices
)
API Reference
# Alignment & unwrapping
kabsch_align(trajectory, reference, align_idx) -> aligned_trajectory
unwrap_system(trajectory, box_dimensions, fragment_idx) -> unwrapped_trajectory
# SASA
calculate_sasa(coords, radii, residue_indices, probe_radius=1.4) -> dict
calculate_sasa_trajectory(trajectory, radii, residue_indices) -> dict
calculate_total_sasa(coords, radii, probe_radius=1.4) -> float
get_vdw_radius(element) -> float
get_radii_array(elements) -> np.ndarray
# Fingerprinting
compute_fingerprints(positions, charges, sigmas, epsilons,
resmap_indices, resmap_offsets, binder_indices) -> (lj, es)
# File I/O
read_prmtop(path) -> AmberTopology
read_inpcrd(path) -> (positions, box_dimensions)
DcdReader(path) # .n_frames, .n_atoms, .read_frame(), .seek(n), .read_all()
Development
git clone https://github.com/msinclair-py/rust-simulation-tools.git
cd rust-simulation-tools
pip install maturin pytest pytest-cov numpy
maturin develop --release
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.2.1.tar.gz.
File metadata
- Download URL: rust_simulation_tools-0.2.1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b80395a8af72a84cc64ceb660ca8db6543c679ef46b1dec02874600977329279
|
|
| MD5 |
d986f3348d3b0fb364070adbd08a2807
|
|
| BLAKE2b-256 |
dddb9b2ae1480735e53f50fa3f6af1d2ccf5232818ff0afb775542f0603f6bfb
|
File details
Details for the file rust_simulation_tools-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 463.1 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
117bfefe0dbf410434666eec62bd72670440737052c13d11cc40b13c3ff0cd26
|
|
| MD5 |
af57f732c10af8e7e92d6cab59fbcc9f
|
|
| BLAKE2b-256 |
a62814b35564bb90d976cdb3386de700d79fa9f35692dd26288a64978da4cdae
|
File details
Details for the file rust_simulation_tools-0.2.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 412.7 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02fe3684c91ff87d6507052e21392f95fffa9c83c2ec8f5f596baa618b55be3b
|
|
| MD5 |
446a1e1bfed56ac727bfb533f221daf7
|
|
| BLAKE2b-256 |
7211f1ccac5cfe95662cff6d20c37c49c89673ace4a2e580e2966ceef98dc8ac
|
File details
Details for the file rust_simulation_tools-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 463.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c22645ab9fe1e0a3f8f76efffd6b99dd57ac58f7cb507c16e588516fff2d8d16
|
|
| MD5 |
d7a5f8c8ab8c04e7fa1d5cde872fb0c1
|
|
| BLAKE2b-256 |
08000678d3b69cfc0da6bfd406fcd72edb0faa6b6216831d7f8388dcf95520ce
|
File details
Details for the file rust_simulation_tools-0.2.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 412.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1726f0d1e9865c6161717e7efe20ad3baf16ad895b07d83ebaec6ab1e6fde0f
|
|
| MD5 |
3e5f482f80b3c8003fbd62c315759b01
|
|
| BLAKE2b-256 |
2b341d45a2af5868153a479870e7be632070821ac879a0820275732a73aa8e12
|
File details
Details for the file rust_simulation_tools-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 461.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ec0dc6d78598fd4a8f160c0059f6a81a9883c14301ea53f25c5e8188eccced
|
|
| MD5 |
cea30d92379e663cbe929808042cf68d
|
|
| BLAKE2b-256 |
3f19bafe3bf241ac32fdc72c8e679b5dc9b4f0e8886d42ea21a359076eef69bb
|
File details
Details for the file rust_simulation_tools-0.2.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 412.2 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acaee4e74398542be56ab0bb94edb94e8772abf8da826b20d026dd5aa0d0c7da
|
|
| MD5 |
2fe1e7ae4787772622351e77e0edf743
|
|
| BLAKE2b-256 |
afa81095b9cbdc2b61255225fc64624811903ddb93fe2babbf962aac233077ef
|
File details
Details for the file rust_simulation_tools-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 461.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48cd9ac102f884710512c621ded546fb03bd70cce29ad20a0ebcb492639fd1f8
|
|
| MD5 |
af19847e5d72875d5278ef6dc4b02093
|
|
| BLAKE2b-256 |
7fac1e467f1fb528da7751f1b50740e45557554f83626cdcc5fafc309080f67a
|
File details
Details for the file rust_simulation_tools-0.2.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 412.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14f7c19e15da81961f30bc4c62220d1f8e81940a9a997dbae471f326755ff7c2
|
|
| MD5 |
aa401783eaee7e6b21ff458655f5b55b
|
|
| BLAKE2b-256 |
7e291be92c322333e02fd0542400f149c4de2e4d6c4e462030a96048f91aff9a
|
File details
Details for the file rust_simulation_tools-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 462.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ee617043ab8f97de3ab335308b22298f005fe49dbf4b30b40a09aa0977b0fb
|
|
| MD5 |
a7151503c6469ce253136169cff12189
|
|
| BLAKE2b-256 |
10925ff4582cc6e9b78f7e5016fd2a019ffadd29f65bb847983d3a8513fe6a0b
|
File details
Details for the file rust_simulation_tools-0.2.1-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: rust_simulation_tools-0.2.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 413.2 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3670b11a7ca5b2269066ca38d83ef70b91a4c28c4a6397252cab4f8180bb6c22
|
|
| MD5 |
ca57814cafaa75d5cc37e141c89aca86
|
|
| BLAKE2b-256 |
34c2dc9b87adf926f2d9b8b7980dbd8aa23011b83bc43a810068a5c8d9d5a154
|