You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Code scan] Water HTI MBAR bond_angle_off uses the wrong branch #126
Problem
The MBAR path in hti_water._post_tasks_mbar() contains if step == 'angle_on' or 'deep_on':, which is always true because the string 'deep_on' is truthy. Therefore the bond_angle_off branch never uses the intended -de * (1-ll) reduced-potential construction, which can silently corrupt MBAR free energies for water HTI.
Reproduction
Unit-test _post_tasks_mbar(..., step='bond_angle_off') with mocked thermo data and inspect the generated block_u. The current code always takes the angle/deep branch instead of the else branch.
Expected result
The condition should explicitly test both positive cases, for example if step in ('angle_on', 'deep_on'), so bond_angle_off uses the intended reduced-potential formula.
Activity