Free Energy Calculations
Compute ΔG of binding, solvation, or mutation via alchemical transformations — coupling/decoupling atoms along a λ pathway. Gold standard for lead optimization in drug discovery: accuracy ~1 kcal/mol for congeneric series.
When to Use This Skill
- Predict ΔΔG_bind between two ligands (RBFE / lead optimization)
- Compute absolute ΔG_bind of a ligand to a protein (ABFE)
- Calculate ΔG_solvation or ΔG_hydration for ADME
- Rank compounds from a small congeneric series (~5-50 molecules)
- Validate force field parameters against experimental affinities
- Analyze convergence of FEP simulations (MBAR, overlap matrix)
Key Methods
| Method |
Estimator |
Windows |
Notes |
| FEP (Zwanzig) |
Exponential avg |
Any |
High variance; avoid for large ΔG |
| TI |
Numerical integration of ⟨∂H/∂λ⟩ |
10-20 |
Requires smooth integrand |
| BAR |
Bennett Acceptance Ratio |
Adjacent pairs |
Better than TI for same data |
| MBAR |
Multistate BAR |
All pairs |
Best variance; recommended |
| RBFE |
Relative: A→B via alchemical |
12-24 λ |
Lead optimization |
| ABFE |
Absolute: ligand → unbound |
~20 λ |
More expensive, independent |
Accuracy Expectations
| System |
Typical error |
Sim. time per edge |
| Congeneric RBFE (neutral) |
0.5-1.5 kcal/mol |
5-10 ns/window |
| RBFE with charge change |
1-3 kcal/mol |
10-20 ns/window |
| ABFE |
1-3 kcal/mol |
20-50 ns/window |
| Solvation ΔG |
0.3-1.0 kcal/mol |
2-5 ns/window |
Quick Start
# pymbar: MBAR from energy matrix (u_kln)
import numpy as np
from pymbar import MBAR
# u_kln[k, l, n] = u_l(x_n^k) / kBT
# k: state from which sample was drawn
# l: state at which energy is evaluated
# n: sample index
K = 12 # number of lambda windows
N_k = np.array([1000] * K) # samples per window
# u_kln shape: (K, K, max(N_k))
mbar = MBAR(u_kln, N_k)
results = mbar.compute_free_energy_differences()
dG = results['Delta_f'][0, -1] # ΔG (kBT units)
ddG = results['dDelta_f'][0, -1] # uncertainty
kBT = 0.5961 # kcal/mol at 298 K
print(f"ΔG = {dG * kBT:.2f} ± {ddG * kBT:.2f} kcal/mol")
Router — What to Read
| Task |
Reference |
| FEP/TI/BAR/MBAR theory, thermodynamic cycles, alchemical path |
references/fep-theory.md |
| OpenMMTools: AlchemicalFactory, ThermodynamicState, MCMC sampling |
references/openmmtools-alchemical.md |
| RBFE protocol: edge network, protein-ligand, results |
references/rbfe-protocol.md |
| ABFE: restraints, double-decoupling, standard state correction |
references/abfe-protocol.md |
| pymbar, overlap matrix, convergence, uncertainty, phase space |
references/pymbar-analysis.md |
Software Stack
| Package |
Install |
Role |
pymbar |
pip install pymbar |
MBAR/BAR/FEP estimators |
openmmtools |
conda install -c conda-forge openmmtools |
Alchemical factories, MCMC |
perses |
conda install -c conda-forge perses |
RBFE pipeline (OpenMM-native) |
openfe |
pip install openfe |
FE campaign management (Lomap + OpenMM) |
alchemtest |
pip install alchemtest |
Test datasets for FE code |
lomap2 |
pip install lomap2 |
Ligand network RBFE planning |
Related Skills
force-fields — system parameterization; OpenFF Sage for ligands
docking — starting poses for ABFE; initial ranking before FEP
mdanalysis — trajectory analysis from FEP runs
scientific-skills:rowan — cloud FEP without local HPC
1---2name: free-energy3description: Use when computing free energy differences for drug discovery. Covers FEP/TI/BAR/MBAR theory, alchemical transformations with OpenMMTools, relative binding free energy (RBFE) protocols, absolute binding free energy (ABFE), pymbar analysis, convergence diagnostics, and standard state corrections.4---56# Free Energy Calculations78Compute ΔG of binding, solvation, or mutation via alchemical transformations — coupling/decoupling atoms along a λ pathway. Gold standard for lead optimization in drug discovery: accuracy ~1 kcal/mol for congeneric series.910## When to Use This Skill1112- Predict ΔΔG_bind between two ligands (RBFE / lead optimization)13- Compute absolute ΔG_bind of a ligand to a protein (ABFE)14- Calculate ΔG_solvation or ΔG_hydration for ADME15- Rank compounds from a small congeneric series (~5-50 molecules)16- Validate force field parameters against experimental affinities17- Analyze convergence of FEP simulations (MBAR, overlap matrix)1819## Key Methods2021| Method | Estimator | Windows | Notes |22|--------|-----------|---------|-------|23| FEP (Zwanzig) | Exponential avg | Any | High variance; avoid for large ΔG |24| TI | Numerical integration of ⟨∂H/∂λ⟩ | 10-20 | Requires smooth integrand |25| BAR | Bennett Acceptance Ratio | Adjacent pairs | Better than TI for same data |26| **MBAR** | Multistate BAR | All pairs | Best variance; recommended |27| RBFE | Relative: A→B via alchemical | 12-24 λ | Lead optimization |28| ABFE | Absolute: ligand → unbound | ~20 λ | More expensive, independent |2930## Accuracy Expectations3132| System | Typical error | Sim. time per edge |33|--------|--------------|-------------------|34| Congeneric RBFE (neutral) | 0.5-1.5 kcal/mol | 5-10 ns/window |35| RBFE with charge change | 1-3 kcal/mol | 10-20 ns/window |36| ABFE | 1-3 kcal/mol | 20-50 ns/window |37| Solvation ΔG | 0.3-1.0 kcal/mol | 2-5 ns/window |3839## Quick Start4041```python42# pymbar: MBAR from energy matrix (u_kln)43import numpy as np44from pymbar import MBAR4546# u_kln[k, l, n] = u_l(x_n^k) / kBT47# k: state from which sample was drawn48# l: state at which energy is evaluated49# n: sample index5051K = 12 # number of lambda windows52N_k = np.array([1000] * K) # samples per window5354# u_kln shape: (K, K, max(N_k))55mbar = MBAR(u_kln, N_k)56results = mbar.compute_free_energy_differences()5758dG = results['Delta_f'][0, -1] # ΔG (kBT units)59ddG = results['dDelta_f'][0, -1] # uncertainty60kBT = 0.5961 # kcal/mol at 298 K6162print(f"ΔG = {dG * kBT:.2f} ± {ddG * kBT:.2f} kcal/mol")63```6465## Router — What to Read6667| Task | Reference |68|------|-----------|69| FEP/TI/BAR/MBAR theory, thermodynamic cycles, alchemical path | `references/fep-theory.md` |70| OpenMMTools: AlchemicalFactory, ThermodynamicState, MCMC sampling | `references/openmmtools-alchemical.md` |71| RBFE protocol: edge network, protein-ligand, results | `references/rbfe-protocol.md` |72| ABFE: restraints, double-decoupling, standard state correction | `references/abfe-protocol.md` |73| pymbar, overlap matrix, convergence, uncertainty, phase space | `references/pymbar-analysis.md` |7475## Software Stack7677| Package | Install | Role |78|---------|---------|------|79| `pymbar` | `pip install pymbar` | MBAR/BAR/FEP estimators |80| `openmmtools` | `conda install -c conda-forge openmmtools` | Alchemical factories, MCMC |81| `perses` | `conda install -c conda-forge perses` | RBFE pipeline (OpenMM-native) |82| `openfe` | `pip install openfe` | FE campaign management (Lomap + OpenMM) |83| `alchemtest` | `pip install alchemtest` | Test datasets for FE code |84| `lomap2` | `pip install lomap2` | Ligand network RBFE planning |8586## Related Skills8788- `force-fields` — system parameterization; OpenFF Sage for ligands89- `docking` — starting poses for ABFE; initial ranking before FEP90- `mdanalysis` — trajectory analysis from FEP runs91- `scientific-skills:rowan` — cloud FEP without local HPC