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.

  • REFINE - a constraints-based 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)

REFINE

REFINE implements SHAKE-type constraints based refinement of approximate molecular structures. It can be a useful post-processor for structures obtained from PCA inverse transforms or from GLIMPS. REFINE learns the set of constraints from a training set of "good" molecular structures, and can then refine further approximate structures:

from mdplus.refinement import REFINE

refiner = REFINE()
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.1rc0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

mdplus-0.1.1rc0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file mdplus-0.1.1rc0.tar.gz.

File metadata

  • Download URL: mdplus-0.1.1rc0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.16

File hashes

Hashes for mdplus-0.1.1rc0.tar.gz
Algorithm Hash digest
SHA256 353ec382eda5a5ca41f097c5a83b1fe3ed3d493b0d52d5f84db0e102dde04cdc
MD5 52c342e6a3639a7e3a7ac1b6a8e2ddfb
BLAKE2b-256 08b6945bddc0527dccecb5213927f86480a2a71ea45ad242bd49e748dfa01d02

See more details on using hashes here.

File details

Details for the file mdplus-0.1.1rc0-py3-none-any.whl.

File metadata

  • Download URL: mdplus-0.1.1rc0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.16

File hashes

Hashes for mdplus-0.1.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 558c41bac249d48b82b5b446d22e027d7d4c0640d6c64c9b3a79881a68a6214d
MD5 5d75caa08d6f16912668a958956394af
BLAKE2b-256 2673cf1767b40e5b304dacc6d82f6ca691ebb26323c9f0970fc833a49c947af7

See more details on using hashes here.

Supported by

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