Skip to content

Catch errors in bulk charge assignment - #2180

Open
jthorton wants to merge 8 commits into
mainfrom
charging_errors
Open

jthorton wants to merge 8 commits into
mainfrom
charging_errors

Conversation

@jthorton

@jthorton jthorton commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Aims to fix #2021. Currently, this will catch all molecules which raise an error and report the full list at the end of the run.

To fully address the issue I think adding a kwarg like raise_errors would make sense, whereby, by default and in the CLI, errors are raised if any molecule fails to have charges assigned as this is the safest option. Then API users can turn this off if they wish.

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes / no
If yes, please provide details here:No

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.
  • Filled in the AI generated code disclosure.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

@jthorton

jthorton commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

pre-commit.ci autofix

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.29%. Comparing base (7b81d32) to head (76c4dbd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...openfe/protocols/openmm_utils/charge_generation.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2180      +/-   ##
==========================================
- Coverage   95.03%   90.29%   -4.75%     
==========================================
  Files         206      206              
  Lines       20527    20581      +54     
==========================================
- Hits        19508    18583     -925     
- Misses       1019     1998     +979     
Flag Coverage Δ
fast-tests 90.29% <93.54%> (?)
slow-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@jthorton

jthorton commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

pre-commit.ci autofix

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.

bulk_assign_partial_charges error when one of many molecules fail charge assignment

1 participant