Skip to main content

The Weir Labs H-bond Systems Analyses modules!

Project description

mdsa-tools: Tools for systems-level analysis of Molecular Dynamics (MD) simulations

CI (Docs) Read the Docs Last commit PyPI version Python versions License

Pipeline overview

Pipeline

We start from an MD trajectory and generate per-frame interaction networks (graphs/adjacency matrices). Adjacencies are flattened (row-wise) into vectors; stacking these per-frame vectors yields a feature matrix suitable for clustering (e.g., k-means) and dimensionality reduction (PCA/UMAP). Results can be visualized with graphs, scatter plots, MDCcircos plots (residue H-bonding), or replicate maps of frame-level measurements of interest.

An additional module uses cluster assignments as candidate substates for Markov state model (MSM) analysis.

Install

pip install mdsa-tools
# Optional:
# pip install "mdsa-tools[docs]"   # if you want to build the docs locally
# pip install "mdsa-tools[examples]"  # if you define this extra for demo deps

Systems Problem Area:

System panel At the Weir Lab at Wesleyan University, we perform molecular dynamics (MD) simulations of a ribosomal subsystem to study tuning of protein translation by the CAR interaction surface- a ribosomal interface identified by the lab that interacts with the +1 codon (poised to enter the ribosome A site). Our "computational genetics" research focuses on modifying adjacent codon identities at the A-site and the +1 positions to model how changes at these sites influence the behavior of the CAR surface and corellate with translation rate variations.

Quickstart example (see examples for more use-cases;contour plots, UMAP, MSM, etc):

Google collab viewer: Open in Colab Jupyter notebook env: Binder

from mdsa_tools.Data_gen_hbond import trajectory
from mdsa_tools.Analysis import systems_analysis
import numpy as np

# --- Load trajectories (replace with your own paths) ---
top1 = "/path/to/system1.prmtop"
traj1 = "/path/to/system1.mdcrd"
top2 = "/path/to/system2.prmtop"
traj2 = "/path/to/system2.mdcrd"

sys1 = trajectory(trajectory_path=traj1, topology_path=top1).create_system_representations()
sys2 = trajectory(trajectory_path=traj2, topology_path=top2).create_system_representations()

# Optionally save for reuse
# np.save("example_systems/system_one.npy", sys1)
# np.save("example_systems/system_two.npy", sys2)

# --- Analyze ---
analyzer = systems_analysis([sys1, sys2])

# Clustering
sil_labels, elbow_labels, sil_centers, elbow_centers = analyzer.cluster_system_level(
    outfile_path="out/syskmeans/", max_clusters=25
)
print("Clustering successfully completed.")

# Dimensionality reduction (PCA or UMAP); color by cluster labels
analyzer.reduce_systems_representations(
    outfile_path="out/PCA/test_", 
    method="PCA",
    colormappings=sil_labels
)
print("PCA reduction successful.")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdsa_tools-1.0.3.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdsa_tools-1.0.3-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file mdsa_tools-1.0.3.tar.gz.

File metadata

  • Download URL: mdsa_tools-1.0.3.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mdsa_tools-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4a5f2b7abd93ee608e63e9dc9e833842cc6af0cdc78ff4afe9b100c5c1d8454b
MD5 9157bb7a048bca0a721c5f569b93381c
BLAKE2b-256 436ebf8a294dd465d78eae878ef1c5589d96fbaf74837e781f46816bcb25d115

See more details on using hashes here.

File details

Details for the file mdsa_tools-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mdsa_tools-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mdsa_tools-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06b6cc754b30f6033f32dd7018f417fff7f61e6f9c88e13f845d49c4de104368
MD5 c872f08de45a61100dcf1326ecbcc4b4
BLAKE2b-256 c4f035d959a1104e8285ace5a70c286f28a69971d35bb42ab251f1d131533ba1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page