Skip to content

Fix water HTI MBAR bond-angle scaling - #154

Open
njzjz-bot wants to merge 2 commits into
deepmodeling:develfrom
njzjz-bot:codex/issue-126-water-mbar-branch
Open

Fix water HTI MBAR bond-angle scaling#154
njzjz-bot wants to merge 2 commits into
deepmodeling:develfrom
njzjz-bot:codex/issue-126-water-mbar-branch

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • use reverse lambda scaling for bond_angle_off MBAR reduced potentials
  • preserve forward scaling for angle_on and deep_on states
  • add a focused regression test

Tests:

  • PYTHONPATH=.. python -m unittest test_hti_water_gen_lammps_input.TestHtiWaterMbar -v
  • python -m ruff check --select I,F --ignore F841 dpti/hti_water.py tests/test_hti_water_gen_lammps_input.py

Fixes #126

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Summary by CodeRabbit

  • Bug Fixes

    • Corrected water hydration calculations for the bond-angle removal step.
    • Ensured this step uses the appropriate reverse lambda scaling.
  • Tests

    • Added regression coverage to verify correct scaling behavior for the bond-angle removal workflow.

njzjz-bot and others added 2 commits August 24, 2026 04:22
Use reverse lambda scaling for the bond_angle_off reduced potential while preserving forward scaling for angle_on and deep_on states. Add a focused regression test.

Coding-Agent: Codex
Codex-Version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a62c3001-f8be-43e0-9fc5-b0b3e090868b

📥 Commits

Reviewing files that changed from the base of the PR and between 78091bd and d23b7f7.

📒 Files selected for processing (2)
  • dpti/hti_water.py
  • tests/test_hti_water_gen_lammps_input.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The MBAR reduced-potential construction for water HTI now uses step-specific lambda scaling. The bond_angle_off path uses inverse-lambda scaling. A NumPy regression test verifies the corrected formula.

Changes

Water HTI MBAR correction

Layer / File(s) Summary
Step-aware MBAR potential construction and regression coverage
dpti/hti_water.py, tests/test_hti_water_gen_lammps_input.py
The new helper applies lambda scaling for angle_on and deep_on, inverse-lambda scaling for bond_angle_off, and rejects unknown steps. _post_tasks_mbar uses the helper. The test checks the bond_angle_off reduced potentials against expected values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d23b7

The PR corrects water MBAR bond-angle scaling while preserving existing scaling for other states and adds a focused regression test; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: yi-fanli

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the water HTI MBAR bond-angle scaling fix.
Linked Issues check ✅ Passed The changes correct MBAR branch selection, apply reverse lambda scaling for bond_angle_off, and add a focused regression test for issue [#126].
Out of Scope Changes check ✅ Passed The changes remain within the linked issue scope and include only the implementation fix and its regression test.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (78091bd) to head (d23b7f7).

Files with missing lines Patch % Lines
dpti/hti_water.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##           devel    #154   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         25      25           
  Lines       6665    6668    +3     
=====================================
- Misses      6665    6668    +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code scan] Water HTI MBAR bond_angle_off uses the wrong branch

1 participant