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

# In house test with our own trajectories

system_one_topology = '/Users/luis/Desktop/workspace/PDBs/5JUP_N2_CGU_nowat.prmtop'
system_one_trajectory = '/Users/luis/Desktop/workspace/PDBs/CCU_CGU_10frames.mdcrd'

system_two_topology = '/Users/luis/Desktop/workspace/PDBs/5JUP_N2_GCU_nowat.prmtop'
system_two_trajectory = '/Users/luis/Desktop/workspace/PDBs/CCU_GCU_10frames.mdcrd'

test_trajectory_one = trajectory(
    trajectory_path=system_one_trajectory,
    topology_path=system_one_topology
)
test_trajectory_two = trajectory(
    trajectory_path=system_two_trajectory,
    topology_path=system_two_topology
)

# now that they're loaded, make system representations
test_system_one_ = test_trajectory_one.create_system_representations()
test_system_two_ = test_trajectory_two.create_system_representations()

# save for reuse
np.save('/Users/luis/Desktop/workspacetwo/example_systems/test_system_one', test_system_one_)
np.save('/Users/luis/Desktop/workspacetwo/example_systems/test_system_two', test_system_two_)

###
### Analysis
###
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.")

# Dimensional 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.4.tar.gz (28.1 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.4-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdsa_tools-1.0.4.tar.gz
  • Upload date:
  • Size: 28.1 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.4.tar.gz
Algorithm Hash digest
SHA256 16ba198b148243ab86420f53f46ecf8637c45a2d7d28701508bf8ed14fc6b92d
MD5 b825fb6d409fd70bf070b5f9f9c00795
BLAKE2b-256 2abc7149060f7594470711d7aafa77fbd4381d533910d68a3fd116cff651c78b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdsa_tools-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 28.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0735b33c418daca8111b7822bd004773fad4dd4bcfb8c15ffb2eee768ed5639
MD5 c047e510c39e985383117fbc7fddb294
BLAKE2b-256 4aabe01ac854709cb029be08f215a92d31bbe8444c30f670ff53a9f6eb91ee26

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