• Stars
    star
    234
  • Rank 170,666 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python implementation of the multistate Bennett acceptance ratio (MBAR)

Build Status Anaconda Cloud Downloads Badge Anaconda Cloud Badge PyPI Version DOI

pymbar

Python implementation of the multistate Bennett acceptance ratio (MBAR) method for estimating expectations and free energy differences from equilibrium samples from multiple probability densities. See our docs.

Installation

The easiest way to install the pymbar release is via conda:

conda install -c conda-forge pymbar

You can also install pymbar from the Python package index using pip:

pip install pymbar

The development version can be installed directly from github via pip:

# Get the compressed tarball
pip install https://github.com/choderalab/pymbar/archive/master.tar.gz
# Or obtain a temporary clone of the repo with git
pip install git+https://github.com/choderalab/pymbar.git

Usage

Basic usage involves importing pymbar and constructing an MBAR object from the reduced potential of simulation or experimental data.

Suppose we sample a 1D harmonic oscillator from a few thermodynamic states:

>>> from pymbar import testsystems
>>> x_n, u_kn, N_k, s_n = testsystems.HarmonicOscillatorsTestCase().sample()

We have the nsamples sampled oscillator positions x_n (with samples from all states concatenated), reduced potentials in the (nstates,nsamples) matrix u_kn, number of samples per state in the nsamples array N_k, and indices s_n denoting which thermodynamic state each sample was drawn from.

To analyze this data, we first initialize the MBAR object:

>>> mbar = MBAR(u_kn, N_k)

Estimating dimensionless free energy differences between the sampled thermodynamic states and their associated uncertainties (standard errors) simply requires a call to compute_free_energy_differences():

>>> results = mbar.compute_free_energy_differences()

Here results is a dictionary with keys Deltaf_ij, dDeltaf, and Theta. Deltaf_ij[i,j] is the matrix of dimensionless free energy differences f_j - f_i, dDeltaf_ij[i,j] is the matrix of standard errors in this matrices estimate, and Theta is a covariance matrix that can be used to propagate error into quantities derived from the free energies.

Expectations and associated uncertainties can easily be estimated for observables A(x) for all states:

>>> A_kn = x_kn # use position of harmonic oscillator as observable
>>> results = mbar.compute_expectations(A_kn)

where results is a dictionary with keys mu, sigma, and Theta, where mu[i] is the array of the estimate for the average of the observable for in state i, sigma[i] is the estimated standard deviation of the mu estimates, and Theta[i,j] is the covariance matrix of the log weights.

See the docstring help for these individual methods for more information on exact usage; in Python or IPython, you can view the docstrings with help().

Authors

References

  • Please cite the original MBAR paper:

    Shirts MR and Chodera JD. Statistically optimal analysis of samples from multiple equilibrium states. J. Chem. Phys. 129:124105 (2008). DOI

  • Some timeseries algorithms can be found in the following reference:

    Chodera JD, Swope WC, Pitera JW, Seok C, and Dill KA. Use of the weighted histogram analysis method for the analysis of simulated and parallel tempering simulations. J. Chem. Theor. Comput. 3(1):26-41 (2007). DOI

  • The automatic equilibration detection method provided in pymbar.timeseries.detectEquilibration() is described here:

    Chodera JD. A simple method for automated equilibration detection in molecular simulations. J. Chem. Theor. Comput. 12:1799, 2016. DOI

License

pymbar is free software and is licensed under the MIT license.

Thanks

We would especially like to thank a large number of people for helping us identify issues and ways to improve pymbar, including Tommy Knotts, David Mobley, Himanshu Paliwal, Zhiqiang Tan, Patrick Varilly, Todd Gingrich, Aaron Keys, Anna Schneider, Adrian Roitberg, Nick Schafer, Thomas Speck, Troy van Voorhis, Gupreet Singh, Jason Wagoner, Gabriel Rocklin, Yannick Spill, Ilya Chorny, Greg Bowman, Vincent Voelz, Peter Kasson, Dave Caplan, Sam Moors, Carl Rogers, Josua Adelman, Javier Palacios, David Chandler, Andrew Jewett, Stefano Martiniani, and Antonia Mey.

Notes

More Repositories

1

software-development

A primer on software development best practices for computational chemistry
254
star
2

openmmtools

A batteries-included toolkit for the GPU-accelerated OpenMM molecular simulation engine.
Python
239
star
3

espaloma

Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm 🍹https://arxiv.org/abs/2010.01196
Python
202
star
4

perses

Experiments with expanded ensembles to explore chemical space
Python
179
star
5

yank

An open, extensible Python framework for GPU-accelerated alchemical free energy calculations.
Python
178
star
6

openmoltools

An open set of tools for automating tasks relating to small molecules
Python
63
star
7

ensembler

Automated omics-scale protein modeling and simulation setup.
Python
52
star
8

openmm-tutorials

Quickstart Python tutorials helping molecular dynamics practitioners get up to speed with OpenMM
Jupyter Notebook
48
star
9

mmtools

Some collected tools for molecular simulation pipelines
Python
41
star
10

qmlify

Jupyter Notebook
40
star
11

espaloma_charge

Standalone charge assignment from Espaloma framework.
Python
34
star
12

ambermini

A stripped-down set of just antechamber, sqm, and tleap.
C
30
star
13

gimlet

Graph Inference on MoLEcular Topology
Python
26
star
14

cpdetect

Change Point detection
Python
24
star
15

neutromeratio

Tautomer ratios in solution
Jupyter Notebook
24
star
16

protons

OpenMM testbed for constant-pH methodologies.
Python
21
star
17

thermopyl

Tools for ThermoML parsing
Python
19
star
18

asapdiscovery

Toolkit for open antiviral drug discovery by the ASAP Discovery Consortium
Python
19
star
19

torsionfit

Bayesian tools for fitting molecular mechanics torsion parameters to quantum chemical data.
Rich Text Format
19
star
20

assaytools

Modeling and Bayesian analysis of fluorescence and absorbance assays.
Python
18
star
21

antibody-mutations

Assessing the impact of mutations on antibody-antigen binding affinity
Python
17
star
22

pymbar-examples

Examples of applications of pymbar to various problems in simulation and experiment
Python
16
star
23

automatic-equilibration-detection

Automatic detection of equilibrated regions of molecular simulations
TeX
16
star
24

pinot

Probabilistic Inference for NOvel Therapeutics
Python
15
star
25

chiron

Differentiable Markov Chain Monte Carlo
Python
14
star
26

feflow

Recipes and protocols for molecular free energy calculations using the openmmtools/perses and Open Free Energy toolkits
Python
13
star
27

integrator-benchmark

Code for enumerating and evaluating numerical methods for Langevin dynamics using near-equilibrium estimates of the KL-divergence. Accompanies https://doi.org/10.3390/e20050318
Jupyter Notebook
12
star
28

yank-examples

Examples for use of YANK - getyank.org
Python
12
star
29

drug-gym

Reinforcement learning environments for drug discovery
Jupyter Notebook
12
star
30

gibbs

Gibbs sampling for expanded ensembles and replica exchange simulations
Python
11
star
31

modelforge

Infrastructure to implement and train NNPs
Python
11
star
32

perses-barnase-barstar-paper

Contains scripts and data for the perses barnase barstar paper
Jupyter Notebook
10
star
33

kinase-metadynamics

To run metadynamics simulations using openMM (based on Peter Eastman's script)
Python
10
star
34

alchemy

Alchemical tools for OpenMM
Python
9
star
35

cadd-grc-2013

Computer Aided Drug Discovery (CADD) GRC 2013 - slides, references, and examples
Jupyter Notebook
9
star
36

yank-benchmark

Standard experimental accuracy benchmark set for YANK.
Jupyter Notebook
8
star
37

nano-drugbank

Cheminformatic analysis of small molecule type drugs in DrugBank for their ability to form nanoparticles with indocyanine dyes.
Jupyter Notebook
7
star
38

refit-espaloma

Refit espaloma with energies and forces
Python
6
star
39

sampl6-physicochemical-properties

SAMPL6 physicochemical property prediction challenge (logD, pKa and solubility)
Jupyter Notebook
6
star
40

thresholds

Utilities for determining maximum tolerable timesteps. See https://doi.org/10.3390/e20050318
Python
6
star
41

fah-xchem

Tools and infrastructure for automated compound discovery using Folding@home
Python
6
star
42

charge-datasets

AM1-BCC ELF10 small molecule training datasets
Python
6
star
43

TargetExplorer

Database framework with RESTful API for aggregating genomic, structural, and functional data for target protein families.
Python
6
star
44

saltswap

Package to fluctuate the number of counterions in an OpenMM simulation
Jupyter Notebook
6
star
45

autonomous-molecular-design

Sandbox for the development of active-learning algorithms for automated drug discovery.
Jupyter Notebook
6
star
46

PDBfinder

a collection of scripts and files to help in PDB retrieval for various projects
Python
6
star
47

moldr

Manifold optimization for linear dimensionality reduction of MD trajectories
Python
6
star
48

SETD8-materials

Code and data for SETD8 simulations
Jupyter Notebook
5
star
49

wetlab-protocols

A collection of protocols, primarily for automated protein expression and mutagenesis
Python
5
star
50

mtenn

Modular Training and Evaluation of Neural Networks
Python
5
star
51

bayesian-itc

Python tools for the analysis and modeling of isothermal titration calorimetry (ITC) experiments.
TeX
5
star
52

rbd-ace2-contact-analysis

Code and workflow for running MD simulations on Folding@home to analyze RBD:ACE2 contacts
Python
5
star
53

robots

Laboratory automation toolkits
Python
5
star
54

fah_prep

suite of functions to prepare simulations (docking, free energy) for use with folding at home.
Python
5
star
55

ROCSALT

Dual topology alchemical free energies
Python
4
star
56

fahmunge

Tools for Munging Folding@Home datasets
Python
4
star
57

alchemical-playground

Tutorials, examples, and thoughts on alchemical free energy calculations
Python
4
star
58

openmm7tutorials

Tutorials using new features in OpenMM 7
AMPL
4
star
59

Ligandr

Ligandr code
Python
4
star
60

fragmenter_data

Data for fragmenter
Jupyter Notebook
4
star
61

ring-open-fep

Ring-opening strategy for FEP.
Python
3
star
62

clusterutils

Utilities for running parallel jobs with Torque/Moab and MPI
Python
3
star
63

openmm-validation

[Work in progress] An extensive validation suite for the OpenMM molecular simulation library.
Python
3
star
64

pdbbind_ml

Scripts to train and evaluate ML models on the PDBBind dataset.
Python
3
star
65

nn-endstates

Jupyter Notebook
3
star
66

peptide-design

Design selective peptides targeting SH2 domains
Jupyter Notebook
3
star
67

status

3
star
68

Ensembler2

Python
3
star
69

gbff

Tools for Bayesian forcefield development
Python
3
star
70

resptools

Tools for multiconformer RESP fits using GAMES
Fortran
3
star
71

bellini

Bayesian Learning on Laboratory Investigation
Python
3
star
72

brokenyank

YANK: GPU-accelerated calculation of ligand binding affinities
Python
3
star
73

docker-fah-client

Information on running the Folding@Home client inside a docker image
Python
3
star
74

pymbar-datasets

Python
3
star
75

SAMPL6-Reference-pKa-Calculations

Reference pKa calculations for the SAMPL6 pKa challenge
Jupyter Notebook
3
star
76

oeante

Antechamber (AMBER GAFF parameterization engine) implementation using OpenEye tools
Python
3
star
77

torsionfit_examples

examples and data for torsionfit
Jupyter Notebook
3
star
78

fluorescence_assay_working_data

Jupyter Notebook
3
star
79

itctools

Tools for setting up ITC experiments in an automated fashion using the Tecan EVO and Auto-iTC 200.
Python
3
star
80

mpiplus

Utilities to run on MPI.
Python
3
star
81

msm-mfpt

Evaluating MSM-estimated mean first passage times
Jupyter Notebook
3
star
82

DDR1_and_kinase_promiscuity_materials

Code and data for the paper 'What makes a kinase promiscuous for inhibitors?'.
Jupyter Notebook
3
star
83

infiniteswitch

Implementation and testing of the infinite switch Hamiltonian exchange integrator.
Python
3
star
84

MSMs

Markov state models
Jupyter Notebook
3
star
85

gcncharge

Graph convolutional networks for partial atomic charges
Jupyter Notebook
3
star
86

kinalysis

Scripts for analyzing simulations of kinases!
Python
2
star
87

papers-and-grants

YAML database of papers and grants from the Chodera lab
Python
2
star
88

msm-pipeline

A pipeline for MSMs.
Python
2
star
89

harbor

A home for docking evaluation and assessment
Python
2
star
90

avoidome-analysis

A repository for downloading and analyzing the available Avoidome structures
Jupyter Notebook
2
star
91

ERK-ancestral-materials

ERK ancestral reconstruction
Jupyter Notebook
2
star
92

duke-cbb-talk-2014-10-06

Slides from John Chodera's CBB talk at Duke University on 6 Oct 2014
2
star
93

assaytools2

Bayesian statistics-based assay modelling, accelerated by TensorFlow.
Jupyter Notebook
2
star
94

enhanced-sampling-tmem175

Repository for running and assessing enhanced sampling simulations of TMEM175
Jupyter Notebook
2
star
95

LDHA-MCCE

MCCE2 calculations for Lactate dehydrogenase A (collaboration with Thompson lab and Gunner lab)
Smarty
2
star
96

IR783-QSNAP

Analysis of Quantitative Structure-Nanoparticle Assembly Prediction (QSNAP) descriptors for predicting drug-indocyanine dye (IR783) nanoparticle formation.
Jupyter Notebook
2
star
97

OpenMMEnergyComparisons

Comparisons of energies and forces between OpenMM and other packages
Python
2
star
98

hsa-affinity

All Human Serum Albumin affinity measurements will be deposited here.
Jupyter Notebook
2
star
99

octomore

finding eight or more parameters we can try for applying openpathsampling to kinases
Jupyter Notebook
2
star
100

kaizen

Continual improvement
2
star