--- id: alchemlyb version: "2.5.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # alchemlyb — the simple alchemistry library License: permissive · Maintenance: active · Downloads: 392.9K/mo ## 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 above — 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 pip install alchemlyb uv add alchemlyb 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_current - Install friction: low - Maintenance: active - Downloads: 392.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags free energy calculations, molecular dynamics analysis, MBAR thermodynamic integration, alchemical free energy, MD simulation parsing, free energy perturbation analysis, equilibration detection, computational-chemistry, molecular-dynamics, free-energy [View on SkillFed](https://skillfed.io/packages/alchemlyb) · [View on PyPI](https://pypi.org/project/alchemlyb/)