Giter Site home page Giter Site logo

apallath / wham Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 34.42 MB

Python package to construct free energy profiles from biased molecular simulation data using both log-likelihood maximization and self-consistent iteration approaches.

Home Page: https://apallath.github.io/WHAM/

License: MIT License

Python 53.18% Makefile 0.49% Shell 0.05% Batchfile 0.62% Cython 45.66%
statistical-mechanics optimization maximum-likelihood

wham's Introduction

WHAM

Python package to construct free energy profiles from umbrella sampling simulation data.

Link to documentation.

Status

Actions Status Open Issues Closed Issues

Code

Python Google Python Style

Details

Binless formulation/MBAR (WHAM.binless) [more accurate]

  • Implemented using log-likelihood maximization for superlinear convergence and self-consistent iteration (as a baseline/for debugging)
  • Support for both 1D and multidimensional umbrella sampling.
  • Support for reweighting 1D profiles to 2D (in a second related order parameter).

Binned formulation (WHAM.binned) [faster]

  • Implemented using log-likelihood maximization for superlinear convergence and self-consistent iteration (as a baseline/for debugging)
  • Support for both 1D and multidimensional^ umbrella sampling.

^-> in progress

Both log-likelihood maximization approaches can use multiple nonlinear optimization algorithms. Read the documentation to see which algorithms are available.

Installation

  1. Install requirements
pip install -r requirements.txt
  1. Build C extensions
python setup.py build_ext --inplace
  1. Install package
pip install .

Usage

See the Jupyter notebooks in the examples/ directory.

Tests

Integration tests are in the directory tests/tests_integration and unit tests are in the directory tests/tests_unit. Navigate to a test directory and run:

pytest

References:

  • Shirts, M. R., & Chodera, J. D. (2008). Statistically optimal analysis of samples from multiple equilibrium states. Journal of Chemical Physics, 129(12). DOI
  • Zhu, F., & Hummer, G. (2012). Convergence and error estimation in free energy calculations using the weighted histogram analysis method. Journal of Computational Chemistry, 33(4), 453โ€“465. DOI
  • Tan, Z., Gallicchio, E., Lapelosa, M., & Levy, R. M. (2012). Theory of binless multi-state free energy estimation with applications to protein-ligand binding. Journal of Chemical Physics, 136(14). DOI

wham's People

Contributors

apallath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

shan9ye

wham's Issues

Optimization issues with log-likelihood maximization approach

When using an initial guess = correct solution + gaussian perturbation:

Nelder-mead does converges to a flat solution
BFGS with 2-point gradient estimation converges to a flat solution
BFGS with jac information does not move away from initial guess

Unexpected behavior, as the landscape is supposed to be convex.

Minor fixes

Remove explicit matrix repeat from binned.pyx

Restart self-consistent WHAM from saved g_i?

Add functionality to pass initial guess g_i as an argument, which allows:

  • restarting self consistent WHAM from last iteration, to iterate further, until convergence
  • passing special initial guesses to log-likelihood WHAM.

Minor fixe

Write C version of logsumexp -> clogsumexp
Move alogsumexp and clogsumexp to lib

Minor fixes

Write C version of logsumexp -> clogsumexp
Move alogsumexp and clogsumexp to lib

WHAM for parallel tempering MC simulations at different temperatures?

Hey guys!

I'm struggling to create a probability distribution from some parallel tempering/replica exchange MC trajectories - it would be interesting to know if you've used this package to reweight and produce a density of states/probability distribution from replica-exchange trajectories each at different temperatures

Thanks,
Shanil

Examples

Add Jupyter Notebook examples on US simulations of particle in a model potential (in OpenMM), for:

  • 1D US
  • 1D to phi-ensemble reweighting
  • 1D to 2D reweighting
  • 2D US
  • Sparse sampling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.