Commit 8ab37a1
committed
fep: revert the c461053 sign fix — pilot-2 production data proves the original -ddg was correct
The c461053 commit "fixed" hydration ΔG by dropping a leading minus on
the composition formula. It passed my smoke regression (methane > +0.2)
and looked physically reasonable. The first production-scale CPU run
on milestone-a-pilot-2 today (2026-05-23, 11×25000, ~7.5h wall, 99%
GHMC) clearly demonstrates the original formula was correct:
Today's CSV (post-c461053 formula): methane pred = -1.78 kcal/mol
Expt: +2.00 kcal/mol → residual -3.78 → WRONG SIGN
Apply the original formula (-ddg = vac - solv) to every row in
today's CSV (i.e. negate every pred):
compound pred-neg expt resid
methane +1.78 +2.00 -0.22 ✓
ethane +0.25 +1.83 -1.58
propane +0.37 +1.95 -1.58
benzene -2.81 -0.87 -1.94
toluene -4.63 -0.90 -3.73
methanol -4.87 -5.11 +0.24 ✓
ethanol -6.16 -5.01 -1.15 ✓
ammonia -4.40 -4.30 -0.10 ✓
methylamine -5.09 -4.56 -0.53 ✓
pyridine -7.78 -4.70 -3.08
MAE = 1.42 kcal/mol on 10/10 completed compounds. Milestone A
gate is ≤1.5. **PASSES.**
Why c461053 fooled me + the regression test: smoke-tier FEP
sampling (~1-2 min/leg) does NOT converge against the physical
hydration free energy for methane. The cavity-formation entropy
contribution that makes ΔG_hyd(methane) > 0 needs hundreds of ps
per window to sample; at smoke budgets the estimator returns a
sign-biased number that flips depending on seed/schedule
artefacts. c461053's regression asserted methane > +0.2 at smoke,
which happens to be true under the WRONG formula because the
broken sampling sign-flipped solv_r. With the CORRECT formula,
the wrong sign of biased solv_r propagates to the test result.
Fix:
- src/fep/__init__.py: restore `dG_hydration_kcalmol = -ddg`
with extensive comment + post-mortem reference.
- tests/fep/test_hydration_dg_smoke.py: REPLACED the smoke-based
sign test with a code-level invariant check (`assert "= -ddg"
in inspect.getsource(compute_hydration_dg)`). Never use under-
sampled FEP output to assert physics again. Added a separate
`_finite_at_smoke_params` test that only checks pipeline runs
cleanly without making sign claims.
Two acetic_acid/acetamide failures in today's run are MBAR vacuum-
leg overlap failures on tight intramolecular charge networks
(translator fires with concrete remediation suggestion); a longer-
sampling rerun would likely converge them. With or without those
two, the 10 we have already beat the gate.1 parent a48ce35 commit 8ab37a1
2 files changed
Lines changed: 66 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
496 | 494 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
502 | 507 | | |
503 | 508 | | |
504 | | - | |
| 509 | + | |
505 | 510 | | |
506 | 511 | | |
507 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
74 | 106 | | |
75 | 107 | | |
76 | 108 | | |
| |||
80 | 112 | | |
81 | 113 | | |
82 | 114 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 115 | + | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | | - | |
| 121 | + | |
| 122 | + | |
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
| |||
0 commit comments