Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-combine electrostatics terms in some plugins #66

Merged
merged 7 commits into from
Jan 22, 2024

Conversation

mattwthompson
Copy link
Member

Description

In openforcefield/openff-interchange#863 it was suggested that the 1-4 interactions need not be split out; this is a little method that adds the 1-4 interactions back into the canonical NonbondedForce and deletes the CustomBondForce that holds them. This doesn't really need to be a method of a plugin class - all it needs is an openmm.System object and the relevant 1-4 scaling factor - so it could live elsewhere.

Todos

Notable points that this PR has either accomplished or will accomplish.

  • Add tests

Questions

  • Question1

Status

  • Ready to go

@mattwthompson mattwthompson marked this pull request as ready for review January 2, 2024 20:37
@mattwthompson mattwthompson reopened this Jan 2, 2024
@mattwthompson mattwthompson reopened this Jan 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69cc47f) 83.74% compared to head (14eea39) 84.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   83.74%   84.23%   +0.48%     
==========================================
  Files           4        4              
  Lines         523      539      +16     
==========================================
+ Hits          438      454      +16     
  Misses         85       85              
Flag Coverage Δ
unittests 84.23% <100.00%> (+0.48%) ⬆️

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

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

Comment on lines +90 to +93
def _recombine_electrostatics_1_4(
self,
system: openmm.System,
):
Copy link
Member Author

Choose a reason for hiding this comment

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

This could probably be moved elsewhere, it only needs the system argument and self.scale_14. Although it does make some implicit assumptions about the presence and structure of other force(s)

@mattwthompson mattwthompson merged commit 4b2fb38 into main Jan 22, 2024
6 checks passed
@mattwthompson mattwthompson mentioned this pull request Jan 23, 2024
1 task
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.

2 participants