Skip to content

Commit a8355c9

Browse files
committed
BENCHMARKS: third-pass Milestone A investigation — three interacting bugs, stop hand-rolling
Tested amber14-all + tip3pfb native-OpenMM solvent leg (same stack binding uses). Results: amber14 native, per-λ min broken: methane solv=+2.01 (matches expt +2.00 after sign-flip), ethanol solv=+9.5 (still off, but better than Interchange +15.5) amber14 native + per-λ min FIXED (Quantity-wrapped positions): methane regresses to -0.42, ethanol stays +15. Per-λ minimise is dropping each window into a different local basin, killing overlap between adjacent windows. So there are at least three interacting issues: 1. Sign convention in compute_hydration_dg (minus on ddg) 2. Interchange → AlchemicalFactory hand-off undersells methane by ~10%, overshoots polar compounds by ~3x 3. Per-λ minimize breaks window overlap on this pipeline Recommendation: stop hand-rolling the alchemical cycle. Adopt openmmtools.multistate or yank (both from choderalab, same stack as openmmtools). Our current sample_alchemical_windows is trying to replicate reference-implementation capabilities by hand and losing subtle physics at each step. No in-tree code changes this round — the hydration driver is at the tag's exact state. Scripts and investigation live in scripts/diagnose_hydration_sign.py (committed) and /tmp ad-hoc (not committed, session-local).
1 parent 6766f0e commit a8355c9

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

BENCHMARKS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,51 @@ via the amber14 stack). If the overshoot disappears, the issue
483483
is in the Interchange → AlchemicalFactory hand-off. If it
484484
persists, it's a deeper protocol bug.
485485

486+
**Third-pass investigation (2026-04-23 late):** tested the
487+
amber14-all + tip3pfb native-OpenMM solvent leg. Result more
488+
informative than conclusive:
489+
490+
| config | methane solv | ethanol solv | methane pred (sign-flip) | ethanol pred (sign-flip) |
491+
|---|---:|---:|---:|---:|
492+
| Interchange, per-λ min broken (bare numpy) | +1.81 | +15.5 | +1.81 ← close | +15.5 ← bad |
493+
| Interchange + direct-space PME | +0.64 | +10.3 | +0.64 | +10.3 |
494+
| amber14 native, per-λ min broken | **+2.01** | +9.5 | **+2.01****matches expt exactly** | +9.5 |
495+
| amber14 native + per-λ min FIXED (Quantity positions) | −0.42 | +15.0 | −0.42 ← regressed | +12.4 |
496+
497+
The per-λ-minimize step in `sample_alchemical_windows` (the
498+
professor's checklist requirement) was silently failing with
499+
"Unit 'dimensionless' is not compatible with Unit 'nanometer'"
500+
because positions came in as bare numpy arrays. When the unit
501+
wrapping is fixed so per-λ minimize actually runs, BOTH methane
502+
and ethanol regress — each window falls into a different local
503+
basin, adjacent windows lose overlap, MBAR returns garbage.
504+
505+
So we have at least three interacting issues:
506+
507+
1. **Sign convention in compute_hydration_dg** (the minus on `ddg`).
508+
2. **Solvent-leg FF builder** — amber14 native gives methane
509+
exactly right while Interchange undershoots ~10 %. Polar
510+
compounds are too high on both.
511+
3. **Per-λ minimize harms convergence** in this pipeline, but
512+
disabling it regresses GHMC acceptance on polar systems
513+
(professor's original concern when he asked for per-λ min).
514+
515+
Pausing code fixes and writing up the findings. The clean path
516+
forward is NOT another round of local patches — it's to stop
517+
hand-rolling the alchemical cycle and adopt
518+
`openmmtools.multistate` (Hamiltonian replica exchange) or
519+
`yank`, both from the same choderalab stack as `openmmtools`
520+
and both reference implementations for absolute hydration FEP.
521+
Our current driver is trying to replicate those capabilities by
522+
hand and losing the subtle physics at each step.
523+
524+
Rollback of the existing hydration driver to the tag's exact
525+
state was kept during this investigation — no in-tree code
526+
changes. Diagnostic scripts live in
527+
`scripts/diagnose_hydration_sign.py`; ad-hoc test scaffolding
528+
in `/tmp/test_amber14_hydration.py` is not committed (session-
529+
local).
530+
486531
---
487532

488533
## 1.3 Alchemical FEP — Milestone B scaffold (binding ΔG / ΔΔG)

0 commit comments

Comments
 (0)