Skip to main content

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?

Metadata

Release files for mdplus 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdplus 0.1.2
File Size Uploaded Provenance
mdplus-0.1.2.tar.gz 30.3 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for mdplus 0.1.2
File
mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details
mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details
mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl CPython 3.9 CPython 3.9 macOS 14.0+ ARM64 Details

Total release size: 659.7 kB

Release files / mdplus-0.1.2.tar.gz

Download URL mdplus-0.1.2.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d47964d82ec92e8d56810d9139e387ca720b5411b373ade62748f023a0419a9
BLAKE2b-256 checksum
How to use checksums
e87e61d2e207e2572e2eaf2ea132eef706f6d7082ea9aa104fa43700a72a64d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.4

Release files / mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl

Download URL mdplus-0.1.2-cp313-cp313-macosx_14_0_arm64.whl
Size 155.1 kB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
ea4271ee02bee18bbfdcc5e34943cac18ab89f0f004cc5410a213496904ad879
BLAKE2b-256 checksum
How to use checksums
52038d11e99c0478f01c3a12b792fcfb4393ae10391dbc405430c47b8eb436d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.4

Release files / mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl

Download URL mdplus-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
Size 156.0 kB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
220cbb26139a767f9beb37b11ab651d8efd9fceffe00276b321a0eec74a5a881
BLAKE2b-256 checksum
How to use checksums
48c8ef948a6f839ed848d86450b66ef7eabdd0a843757bbc438ffa98603da968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.4

Release files / mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl

Download URL mdplus-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
Size 158.1 kB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
186de92916d2e10f82c21564e274c32c52f0ac1dbcaa5a7e75525d8bcf6e3079
BLAKE2b-256 checksum
How to use checksums
45b740bb34aa561efe9077700d418eb8c8b1540945302b3d5f9a9cc81b3109c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.4

Release files / mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl

Download URL mdplus-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
Size 160.2 kB
Tags CPython 3.9 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
7ef3f1c012875c697cf48cff1e37abe1fe586f39f4495f3b0e38eef0725d9065
BLAKE2b-256 checksum
How to use checksums
a5a922d5d961c86a9f0cfb81fafd6baab6bb10b9196184fc96e414b764464fba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.4

Security for mdplus 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page