Skip to content

Let the force field resolve the partial charge assignment - #2152

Open
jthorton wants to merge 1 commit into
mainfrom
charge_from_ff
Open

Let the force field resolve the partial charge assignment#2152
jthorton wants to merge 1 commit into
mainfrom
charge_from_ff

Conversation

@jthorton

Copy link
Copy Markdown
Collaborator

Fixes #2116, #2117

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:

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

@github-actions

Copy link
Copy Markdown

No API break detected ✅

View workflow run

Griffe output
$ griffe check "openfe" -s src --no-inspection --no-color --verbose -a origin/main

$ griffe check "openfecli" -s src --no-inspection --no-color --verbose -a origin/main

if force_field is not None:
ff = ForceField(force_field)
if "ToolkitAM1BCC" in ff.registered_parameter_handlers:
ff.deregister_parameter_handler("ToolkitAM1BCC")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user has 2.3.0 this will apply NAGL charges as the force field defines but might not be what the user wants if they expect am1bcc

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.44%. Comparing base (1d4610b) to head (cd183a8).

Files with missing lines Patch % Lines
...openfe/protocols/openmm_utils/charge_generation.py 25.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2152      +/-   ##
==========================================
- Coverage   95.14%   90.44%   -4.70%     
==========================================
  Files         213      213              
  Lines       20916    20927      +11     
==========================================
- Hits        19900    18927     -973     
- Misses       1016     2000     +984     
Flag Coverage Δ
fast-tests 90.44% <25.00%> (?)
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.

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.

Add a "forcefield" optional to assign_partial_charges

1 participant