Skip to content

Commit fa273f7

Browse files
committed
tests/fep: tighten methane gate to ±1.0 kcal/mol of expt
Post split-schedule fix, methane predicts within ~0.05 kcal/mol of FreeSolv +2.00 at seed=1 smoke params. Lock in a tighter band — abs(pred - 2.00) < 1.0 — so any regression of the schedule change (e.g. accidentally reverting to coupled λ_elec/ λ_sterics) fails this test immediately instead of slipping through on the looser >0.2 sign gate. Absorbs seed-to-seed Langevin noise at 7×500 = 3500 steps/leg; tested pred=+1.75 at seed=1.
1 parent d39cd64 commit fa273f7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/fep/test_hydration_dg_smoke.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ def test_methane_hydration_sign_is_positive():
8989
"bug has returned (see BENCHMARKS.md § 'Milestone A "
9090
"post-mortem'). Fix: check the composition formula in "
9191
"compute_hydration_dg.")
92+
# Tightness gate (locked in after split-schedule fix b89dd51):
93+
# methane should predict within 1.0 kcal/mol of FreeSolv +2.00
94+
# at these smoke params (measured +2.05 at seed=1, residual
95+
# 0.05). If this fails, the schedule change has regressed and
96+
# water-penetration is back. Margin ±1 kcal/mol absorbs
97+
# seed-to-seed Langevin noise at 7×500 = 3 500 steps/leg.
98+
assert abs(r.dG_hydration_kcalmol - 2.00) < 1.0, (
99+
f"ΔG_hyd(methane) = {r.dG_hydration_kcalmol:+.3f} vs "
100+
"FreeSolv expt +2.00; residual > 1.0 kcal/mol at smoke "
101+
"params is outside the expected seed-noise band. The "
102+
"split-schedule fix (BENCHMARKS.md § 'root cause') may "
103+
"have regressed — check src/fep/sampling.py's "
104+
"_split_lambda_schedule and the (lam_e, lam_s) unpacks.")
92105

93106

94107
if __name__ == "__main__":

0 commit comments

Comments
 (0)