pku-yuangroup/openai4s/bio-chemoinformatics-free-energy-calculations
Claude Code and agent skill by pku-yuangroup/openai4s
- community
Checking that the SKILL.md file is still in the repository.
Performs alchemical free-energy calculations including relative binding free energy (RBFE / FEP+) and absolute binding free energy (ABFE) via OpenFE, FEP+, GROMACS, AMBER pmemd, and OpenMM with explicit lambda scheduling, soft-core potentials, MBAR/BAR analysis, cycle-closure validation, and protocol-appropriate enhanced sampling. Compares ML alternatives (Boltz-2 affinity, DeepDock). Use when ranking analogs by binding affinity beyond docking accuracy, performing prospective lead optimization, or validating SAR predictions.
Install
npx vskill@latest install pku-yuangroup/openai4s/bio-chemoinformatics-free-energy-calculationsSKILL.md
The same SKILL.md was published earlier as pku-yuangroup/openai4s/bio-chemoinformatics-free-energy-calculations.
Version Compatibility
Reference examples tested with: OpenFE 1.7+, OpenMM 8.1+, GROMACS 2024+, AMBER pmemd 22+, alchemlyb 2.1+, pymbar 4.0+, RDKit 2024.09+.
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
openfe --version;gmx --version;pmemd.cuda --version
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Free Energy Calculations
Predict binding free-energy differences (RBFE) or standard binding free energies (ABFE) using alchemical methods. FEP+ is a commercial workflow and OpenFE is an open-source framework. Accuracy and cost vary substantially with system, perturbation, force field, setup, sampling, and evaluation design; report the protocol and benchmark relevant to the intended decision. The Boltz-2 report includes benchmark-specific comparisons with FEP methods but does not replace prospective validation on the project chemistry.
For docking input poses, see chemoinformatics/virtual-screening. For pose validation before FEP, see chemoinformatics/pose-validation. For ML alternatives, see chemoinformatics/ml-docking-rescoring.
FEP Method Taxonomy
| Method | Cost / pair | Accuracy | Use case | Fails when | |
|---|---|---|---|---|---|
| FEP+ (Schrödinger) | System- and protocol-dependent GPU cost | Published commercial RBFE workflow | Commercial lead optimization | License and reproducibility constraints | |
| OpenFE RBFE | System- and protocol-dependent GPU cost | Open-source RBFE with documented protocols | Open-source campaigns | Mapping/setup/sampling require review | |
| OpenFE ABFE | Generally more setup and sampling than one RBFE edge | Standard binding free energy | No congeneric reference ligand required | Restraints and end-state corrections | |
| GROMACS / AMBER RBFE | Implementation-dependent | Custom alchemical workflows | Expert-controlled setup | Manual validation burden | |
| FEP-SPell-ABFE | Protocol/system-dependent | Automated ABFE workflow | Evaluate published and project benchmarks | Limited adoption | |
| QligFEP v2.1 | Protocol/system-dependent | Q-based ligand FEP | Evaluate published and project benchmarks | Different approximations/tooling | |
| MM/PBSA / MM/GBSA | Lower-cost endpoint analysis | Approximate endpoint score | Exploratory within-series comparison | Entropy, sampling, and model dependence | |
| Boltz-2 affinity | seconds GPU | 0.66 Pearson on reported FEP benchmark subset | ML alternative; reported >=1000x lower cost | Novel chemotypes | |
| ALEPB / EE-AMBER | Protocol/system-dependent | Specialized methods | Evaluate matched evidence | Limited tooling |
Decision: For congeneric lead-optimization questions, evaluate a validated RBFE protocol and perturbation network. Use endpoint methods only for decisions supported by a project-specific benchmark. Candidate counts and escalation gates should follow compute budget, uncertainty, and prospective validation rather than a universal top-N rule.
Decision Tree by Scenario
| Scenario | Recommended workflow | |
|---|---|---|
| Rank close analogs (R-group SAR) | RBFE via OpenFE (cycle: lig1↔lig2↔lig3) | |
| Cross-scaffold ranking | ABFE per ligand; or coordinated RBFE with star network | |
| Congeneric lead-optimization set | RBFE with a connected, redundancy-aware perturbation graph | |
| Single ligand affinity | ABFE (no reference needed) | |
| Lower-cost exploratory ranking | A project-validated endpoint or ML method, followed by orthogonal confirmation | |
| Novel scaffold prospective | Treat ML affinity as triage; validate selected decisions prospectively | |
| Selectivity (target vs off-target) | RBFE on both proteins; report delta-delta-G | |
| Allosteric vs orthosteric | ABFE comparable; check pose stability with MD | |
| Ions / metal centers | Specialized force field (ZAFF, MCPB.py); not standard FEP |
Relative Binding Free Energy (RBFE) Setup
Goal: Calculate delta-delta-G between two ligands (lig1 -> lig2) in pocket.
Approach: Alchemical transformation lig1 -> lig2 in both bound state (pocket + ligand + water) and unbound state (ligand + water alone). Thermodynamic cycle:
The protocol object does not itself choose an atom mapping or define a simulation. Create or inspect a mapping (Kartograf is the OpenFE 1.7 CLI default; LOMAP is also supported), construct bound and solvent Transformation objects, create their protocol DAGs, and run them through openfe quickrun or the documented Python execution interface. Always inspect the selected mapping before running.
Lambda Window Scheduling
| Stage | Lambda values | Purpose | |
|---|---|---|---|
| Decoupling (vdW) | 0.0, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 1.0 | Turn off ligand vdW | |
| Charging (Coulomb) | 0.0, 0.25, 0.5, 0.75, 1.0 | Turn off ligand partial charges | |
| Restraint (ABFE only) | 0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0 | Boresch-style restraints |
The 12-20 windows and 5-20 ns per-window ranges are repository starting ranges, not universal prescriptions. Select and extend them from overlap, exchange, and replicate-convergence diagnostics for the system; total cost therefore varies substantially.
Enhanced Sampling
REST2 (Replica Exchange with Solute Tempering) is one enhanced-sampling approach used in some FEP workflows. It scales selected interactions to improve barrier crossing, but suitability and implementation are engine- and protocol-specific.
In FEP+, REST2 region typically includes:
- The entire ligand
- Flexible binding-site loops
- Catalytic / ionic residues with high pKa shift potential
FEP+ can use a configured REST2 region. OpenFE's RelativeHybridTopologyProtocol uses Hamiltonian replica exchange across its lambda states by default; that is not the same as REST2, and OpenFE does not automatically apply REST2. Use only enhanced-sampling modes supported and documented by the selected protocol and version.
MBAR/BAR Analysis
After production simulation, extract delta-G via MBAR (Multistate Bennett Acceptance Ratio) or BAR (Bennett Acceptance Ratio). MBAR uses data from all windows simultaneously; BAR uses adjacent windows.
MBAR.delta_f_ and d_delta_f_ are dimensionless (in kT) until explicitly converted. The parser shown above reads GROMACS XVG files. For other engines, use the engine-specific parser supported by the installed alchemlyb version.
Cycle Closure Analysis
For a single directed thermodynamic cycle, the signed closure residual is the sum of its edges and should be consistent with zero within uncertainty. An RMS closure statistic requires residuals from multiple cycles and a stated aggregation convention.
Interpret each closure residual relative to propagated edge uncertainties, replicate behavior, shared-edge correlations, network topology, and the decision supported. If reporting RMS across cycles, state which cycles were included and avoid treating correlated cycles as independent observations.
Absolute Binding Free Energy (ABFE)
ABFE computes delta-G of binding for a single ligand (no reference compound).
Goal: Estimate the standard binding free energy of a single ligand prospectively. Conversion to an equilibrium dissociation constant requires an explicit standard-state convention; ABFE does not generically predict an assay Ki.
Approach: Decouple ligand from solvated state and from pocket-bound state separately; correction terms for analytical end states.
Use OpenFE's documented AbsoluteBindingProtocol workflow: construct the ligand and complex chemical systems, select and inspect the restraint setup, create the corresponding Transformation objects, serialize them with Transformation.to_json(), and execute each transformation with openfe quickrun. Do not substitute an ad hoc absolute-free-energy CLI; OpenFE does not provide that command.
ABFE is harder than RBFE: requires Boresch-style restraints to keep ligand near pocket during decoupling. Restraint contribution must be analytically corrected.
ABFE cost relative to RBFE depends on the protocols, number of legs/windows/repeats, and convergence requirements; estimate it from the explicit campaign plan.
MM/PBSA, MM/GBSA Endpoint Methods
Lower-cost endpoint alternatives whose usefulness must be established on a matched benchmark:
Sample input:
Use case: Exploratory ranking when a matched retrospective benchmark shows the endpoint method supports the intended decision. Do not transfer generic correlation ranges across targets or protocols.
Force Field Selection
| Force field | Use for | Notes | |
|---|---|---|---|
| OPLS4 (Schrödinger) | FEP+ default | Commercial; well-tested | |
| OpenFF 2.1.1 (Sage) | OpenFE 1.7 documented default | Inspect serialized settings; newer OpenFE releases use different defaults | |
| GAFF2 | AMBER FEP | Use for ligand only; protein FF14SB | |
| GAFF | Legacy | Replaced by GAFF2 | |
| CGenFF | CHARMM-style FEP | CHARMM force-field family | |
| ANI-2x | Mixed QM/MM | Experimental for FEP | |
| MACE-OFF | Modern ML force field | Promising for FEP, limited tooling |
For OpenFE 1.7, the versioned documentation shows OpenFF 2.1.1 for the ligand and Amber-family protein/water XMLs including ff14SB and TIP3P. Inspect and serialize the actual protocol settings because defaults change between releases.
Per-Tool Failure Modes
Insufficient sampling
Trigger: Production length is insufficient for a slow ligand or protein degree of freedom.
Mechanism: Replica exchange improves state mixing but is not a panacea; some conformational changes remain slow.
Symptom: Replicates, time-sliced estimates, overlap/exchange diagnostics, or closure residuals are inconsistent with the reported uncertainty.
Fix: Increase sampling, inspect exchange and state overlap, run independent repeats, and investigate slow protein/ligand degrees of freedom. Use only protocol-supported enhanced sampling; check whether the pose is genuinely stable.
Force-field artifacts
Trigger: Charged ligand or charged pocket residue.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bioskills/bio-chemoinformatics-free-energy-calculations/SKILL.md
Popularity
- Repository stars
- 608
- Repository forks
- 71
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pku-yuangroup/openai4s/bio-chemoinformatics-free-energy-calculations)