skillfed

alchemlyb

the simple alchemistry library

alchemlyb v2.5.0 392.9K downloads/30d#7,002 on PyPI243
Permissive license BSD-3-Clause Active released

What it is and what it does

alchemlyb is a Python library for analyzing alchemical free energy calculations from molecular dynamics simulations. It sits atop the PyData stack (numpy, pandas, scipy, scikit-learn, matplotlib) and provides three main layers: parsers that extract raw data from output files of common MD engines (GROMACS, AMBER, NAMD, and others), subsamplers that extract uncorrelated and equilibrated samples from timeseries data using techniques like those in pymbar, and estimators that compute free energies directly using best-practices methods including multistate Bennett acceptance ratio (MBAR), BAR, and thermodynamic integration (TI).

The package is designed for computational chemists and molecular dynamics practitioners who need to post-process simulation output and extract thermodynamic quantities. It abstracts away the boilerplate of parsing heterogeneous file formats and handling statistical correlation in timeseries, letting users focus on the analysis and interpretation of results. The library is actively maintained, supports modern Python versions (3.11–3.14), and has no compiled dependencies.

Use it for:

  • Extract and analyze free energy differences from GROMACS, AMBER, or NAMD simulations using MBAR or BAR estimators.
  • Detect equilibration in molecular dynamics trajectories and subsample to obtain independent, uncorrelated configurations for downstream analysis.
  • Compute free energies via thermodynamic integration from alchemical simulation data.
  • Parse and standardize output from multiple MD engines into a common pandas-based data structure for comparative analysis.
  • Automate post-processing of alchemical free energy perturbation (FEP) calculations in high-throughput workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

alchemlyb parses molecular dynamics simulation output, extracts uncorrelated samples from timeseries data, and estimates free energies using MBAR, BAR, and thermodynamic integration methods.

Yes. alchemlyb is actively maintained, has no known vulnerabilities, carries a permissive BSD-3-Clause license, and requires only standard PyData stack dependencies (low install friction). It is purpose-built for a specific, well-defined task—free energy analysis from MD simulations—and does it with established statistical methods. Install it if you work with alchemical free energy calculations; skip it if you do not.

Install

alchemlyb on PyPI

pip

pip install alchemlyb

uv

uv add alchemlyb

poetry

poetry add alchemlyb

Installing alchemlyb

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance (last commit 2026-06-01, 296 days since release). Requires Python 3.11 or later and 9 runtime dependencies from the PyData stack (numpy, pandas, scipy, scikit-learn, matplotlib, pymbar, loguru, pyarrow, joblib).

License in practice

BSD-3-Clause is permissive; you can use, modify, and distribute alchemlyb freely in commercial and private projects provided you include the license notice.

Quickstart

pip install alchemlyb

import alchemlyb
from alchemlyb.parsing import gromacs

# Parse GROMACS free energy output
data = gromacs.extract_u_nk('md.xvg')

from alchemlyb.estimators import MBAR
estimator = MBAR()
estimator.fit(data)
print(estimator.delta_f_)  # Free energy differences

Requires Python 3.11 or later. Input files must come from supported MD engines (GROMACS, AMBER, NAMD, etc.); parser availability depends on the engine used.

Verify before relying

  • Whether parsers support all simulation engines mentioned (GROMACS, AMBER, NAMD, others) equally well or if some are more mature than others.
  • Performance characteristics when handling large timeseries datasets or high-dimensional free energy landscapes.
  • Whether the package includes example workflows or tutorials for common use cases beyond the basic API.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 9 — numpy, pandas, pymbar, scipy, scikit-learn, matplotlib, loguru, pyarrow, joblib
Maintenance actively maintained — 296 days since the last release
Last repo commit
First released
Downloads 392,931/month — #7,002 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: alchemlyb-2.5.0-py3-none-any.whl

Keywords: free energy, MBAR, thermodynamic integration, free energy perturbation, FEP, alchemistry, analysis, GROMACS, NAMD, AMBER, molecular dynamics

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: ChemistryTopic :: Software Development :: Libraries :: Python Modules

Tags

free energy calculationsmolecular dynamics analysisMBAR thermodynamic integrationalchemical free energyMD simulation parsingfree energy perturbation analysisequilibration detection
computational-chemistrymolecular-dynamicsfree-energy

More Scientific/Engineering packages