--- id: pymbar version: "4.0.3" license: MIT license_treatment: permissive maintenance: aging --- # pymbar — Python implementation of the multistate Bennett acceptance ratio (MBAR) method License: permissive · Maintenance: aging · Downloads: 125.5K/mo ## 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 above — verify before relying. pymbar implements the multistate Bennett acceptance ratio (MBAR) method to estimate free energy differences and expectation values from equilibrium samples across multiple thermodynamic states. 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 pip install pymbar uv add pymbar poetry add pymbar ## Installing pymbar 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. 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() 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. 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_current - Install friction: low - Maintenance: aging - Downloads: 125.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags free energy calculation, MBAR multistate Bennett, thermodynamic analysis, molecular simulation analysis, equilibrium sampling, free energy differences, reduced potential analysis, molecular-dynamics, free-energy, statistical-analysis [View on SkillFed](https://skillfed.io/packages/pymbar) · [View on PyPI](https://pypi.org/project/pymbar/)