pymbar
Python implementation of the multistate Bennett acceptance ratio (MBAR) method
Decision gist · record as of 2026-08-14
Yes, if you work with molecular simulations and need to analyze multi-state equilibrium data. The package is stable, has no known vulnerabilities, installs easily, and is widely used in computational chemistry. The aging maintenance status (876 days since release) is not a blocker—the last commit is recent and the core algorithm is mature—but verify that it meets your specific simulation software's version requirements before committing to a large analysis pipeline.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.6.
- JAX acceleration is optional; the non-JAX version runs without it but may be slower.
- If using JAX, pymbar will enable 64-bit mode, which may conflict with other JAX code in the same process that requires 32-bit precision.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute pymbar with minimal restrictions, making it suitable for both academic and commercial projects.
last release 2024-03-21 (876 days) · last repo commit 2026-02-12 · 313 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 125,476 downloads/mo, #11,814 on PyPI
Alternatives
Verify before relying
pip install pymbar
from pymbar import MBAR, testsystems
# Load test data: reduced potentials u_kn and sample counts N_k
x_n, u_kn, N_k, s_n = testsystems.HarmonicOscillatorsTestCase().sample()
# Initialize MBAR and compute free energy differences
mbar = MBAR(u_kn, N_k)
results = mbar.compute_free_energy_differences()- Whether JAX acceleration is automatically enabled or requires explicit installation of the pymbar[jax] extra
- Performance characteristics when analyzing large datasets or high-dimensional systems
- Compatibility with recent versions of JAX given the 64-bit precision requirement mentioned in the description
What it is and what it does
pymbar is a Python library that implements the multistate Bennett acceptance ratio method, a statistical technique for analyzing molecular simulation data. It takes reduced potential matrices from equilibrium samples across multiple thermodynamic states and computes free energy differences between those states along with their uncertainties. The package also estimates expectation values for observables across all states, providing covariance matrices for error propagation.
The library is designed for computational chemistry and molecular dynamics workflows. It accepts reduced potential data (typically from molecular simulations), initializes an MBAR object, and provides methods to compute free energy differences and expectations with associated standard errors. It depends on numpy, scipy, and numexpr for numerical computation, and optionally uses JAX for acceleration if available.
Use it for
- Computing free energy differences between ligand-bound and unbound protein states in drug discovery
- Analyzing alchemical transformation simulations to estimate binding affinities
- Estimating thermodynamic properties and their uncertainties from parallel tempering or replica exchange simulations
- Extracting equilibrium averages and covariance information from multi-state sampling experiments
- Validating molecular simulation convergence by computing free energy estimates across different equilibration lengths
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with molecular simulations and need to analyze multi-state equilibrium data.
The package is stable, has no known vulnerabilities, installs easily, and is widely used in computational chemistry. The aging maintenance status (876 days since release) is not a blocker—the last commit is recent and the core algorithm is mature—but verify that it meets your specific simulation software's version requirements before committing to a large analysis pipeline.
Install
pymbar on PyPI
Before you install
Low friction install with pure Python wheels. The package is aging (876 days since last release) but remains actively maintained; last commit was 2026-02-12. Depends only on numpy, scipy, and numexpr—all stable, widely-available libraries.
Requires Python >= 3.6. JAX acceleration is optional; the non-JAX version runs without it but may be slower. If using JAX, pymbar will enable 64-bit mode, which may conflict with other JAX code in the same process that requires 32-bit precision.
License in practice
MIT license is permissive; you can use, modify, and distribute pymbar with minimal restrictions, making it suitable for both academic and commercial projects.
Quickstart
pip install pymbar
from pymbar import MBAR, testsystems
# Load test data: reduced potentials u_kn and sample counts N_k
x_n, u_kn, N_k, s_n = testsystems.HarmonicOscillatorsTestCase().sample()
# Initialize MBAR and compute free energy differences
mbar = MBAR(u_kn, N_k)
results = mbar.compute_free_energy_differences()
Verify before relying
- Whether JAX acceleration is automatically enabled or requires explicit installation of the pymbar[jax] extra
- Performance characteristics when analyzing large datasets or high-dimensional systems
- Compatibility with recent versions of JAX given the 64-bit precision requirement mentioned in the description
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpyscipynumexpr |
| Maintenance | Aging 876 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,476 / month, #11,814 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 |
Evidence: pymbar-4.0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “free energy calculation”
- pymbarpymbar implements the multistate Bennett acceptance ratio (MBAR)…
- ViennaRNAViennaRNA provides Python bindings to a C library for predicting and…
- alchemlybalchemlyb parses molecular dynamics simulation output, extracts…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also alchemlyb · chemprop · primer3-py · MDAnalysis · nutpie · numpyro · chemicals · pystan · pdb2pqr · emcee