Skip to main content

Tools for molecular dynamics simulation setup and analysis.

Project description

MDPlus: Python tools for molecular modelling.

Introduction

MDPlus brings together a number of tools related to the setup and analysis of molecular simulations:

  • PCA - the Principal Component Analysis library as used by pyPcazip.

  • Glimps - a machine learning method for backmapping coarse-grained structures to finer-grained ones.

  • ENM - an elastic network approach to the refinement of approximate molecular models.


Installation:

Easiest via pip:

pip install mdplus

Getting started:

API overview

For maximum compatibility with other Python-based MD simulation processing packages, All tools operate on simple arrays of coordinate data (typically [n_frames, n_atoms, 3] numpy arrays).

All tools have a similar API, modelled on the transformer object approach that used by many of the utilities in scipy and scikit-learn.

PCA

An instance of a PCA transformer is fit to an ensemble of structures, to obtain the eigenvectors, eigenvalues and mean. This trained transformer can then be used to transform further coordinate sets of the same system into the PCA space, and vice-versa:

from mdplus.pca import PCA

pca_transformer = PCA()
pca_transformer.fit(traj) # traj should be an [n_frames, n_atoms, 3] numpy array
scores = pca_transformer.transform(traj) # scores will be an [n_frames, n_components] numpy array
reconstituted_traj = pca_transformer.inverse_transform(scores)

Glimps

While tools to transform high-resolution models to lower resolution ones (e.g. atomistic to coarse-grained) are relatively available and/or easy to implement, the reverse - "back-mapping" - is typically much harder. Given a training set of high-resolution structures and their low-resolution counterparts obtained by application of a forward-mapping tool, Glimps learns the reverse transform from the low resolution dataset to the higher resolution one, and once trained can back-map further low-resolution models.

from mdplus.multiscale import Glimps

backmapper = Glimps()
backmapper.fit(cg_training_traj, fg_training_traj) # matched pairs of low and high resolution structures
fg_structure = backmapper.transform(cg_structure)

Command-line tools for back mapping are also available - see the glimps_example folder.

ENM

ENM implements an elastic network restraints-based refinement of approximate molecular structures. It can be a useful post-processor for structures obtained from PCA inverse transforms or from Glimps. ENM learns the set of restraints from a training set of "good" molecular structures, and can then refine further approximate structures:

from mdplus.refinement import ENM

refiner = ENM()
refiner.fit(training_traj) # A diverse collection of good-quality structures
refined_traj = refiner.transform(crude_traj)

Who do I talk to?

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

mdplus-0.1.2.tar.gz (30.3 kB view details)

Uploaded Source

Built Distributions

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

mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl (155.1 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl (156.0 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl (158.1 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl (160.2 kB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

File details

Details for the file mdplus-0.1.2.tar.gz.

File metadata

  • Download URL: mdplus-0.1.2.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for mdplus-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3d47964d82ec92e8d56810d9139e387ca720b5411b373ade62748f023a0419a9
MD5 b09499ac2ad2bd64cd1da1ba37d3c496
BLAKE2b-256 e87e61d2e207e2572e2eaf2ea132eef706f6d7082ea9aa104fa43700a72a64d3

See more details on using hashes here.

File details

Details for the file mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ea4271ee02bee18bbfdcc5e34943cac18ab89f0f004cc5410a213496904ad879
MD5 e06e04103a8310db78fab21cdc065a04
BLAKE2b-256 52038d11e99c0478f01c3a12b792fcfb4393ae10391dbc405430c47b8eb436d9

See more details on using hashes here.

File details

Details for the file mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 220cbb26139a767f9beb37b11ab651d8efd9fceffe00276b321a0eec74a5a881
MD5 01cb668acb633ed89a8b71748cbde92d
BLAKE2b-256 48c8ef948a6f839ed848d86450b66ef7eabdd0a843757bbc438ffa98603da968

See more details on using hashes here.

File details

Details for the file mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 186de92916d2e10f82c21564e274c32c52f0ac1dbcaa5a7e75525d8bcf6e3079
MD5 fa13a8022def2f6aeb6abe816cb77697
BLAKE2b-256 45b740bb34aa561efe9077700d418eb8c8b1540945302b3d5f9a9cc81b3109c4

See more details on using hashes here.

File details

Details for the file mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7ef3f1c012875c697cf48cff1e37abe1fe586f39f4495f3b0e38eef0725d9065
MD5 5ff6f4dc8e9b0d6575fd53b88d31c3fe
BLAKE2b-256 a5a922d5d961c86a9f0cfb81fafd6baab6bb10b9196184fc96e414b764464fba

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