-
Notifications
You must be signed in to change notification settings - Fork 35
Check user charges are not changed by espaloma #1707
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
Conversation
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
…loma_user_charges
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1707 +/- ##
==========================================
- Coverage 95.47% 92.50% -2.97%
==========================================
Files 187 187
Lines 16231 16244 +13
==========================================
- Hits 15496 15027 -469
- Misses 735 1217 +482
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
IAlibay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct in understanding this is happening because "from-molecule" is the default argument if you don't pass any template kwargs? https://github.com/openmm/openmmforcefields/blob/main/openmmforcefields/generators/template_generators.py#L1735
I might be looking in the wrong place, but it seems conflicting with the docstring: https://github.com/openmm/openmmforcefields/blob/1c969a638f72e8814fd29c5fd86f1af37517a783/openmmforcefields/generators/template_generators.py#L1657-L1658
Given that the defaults for when you pass in the kwargs is different from when you don't, I suspect it's actually a bug that is working in our favour.
It might be good to deal with this upstream (even if it means it might break behaviour here).
| stateB=benzene_vacuum_system, | ||
| mapping=None, | ||
| ) | ||
| unit = list(dag.protocol_units)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why we should slowly rename things to offunit and ommunit, but maybe not in this PR.
|
No API break detected ✅ |
Yes thats right, so the doc string seems to be incorrect, while its working in a our favour now if we ever pass some args to the generator it could break in future so this test should give us peace of mind for now. I'll open an issue upstream to see what needs to be fixed. |
|
@IAlibay its slightly more complicated than we thought, I found that the section which assigns the charges in the espaloma template generator which does another check for user charges and if they are not present changes the method back to |
Could you expand on the complication here? I might be misunderstanding, but that bit of the code seems to be doing what I would expect. I.e. if it's got no charges it's going to have to generate some, might as well generate them with espaloma. |
|
My thinking was that it adds another layer of confusion with regards to the docstring, it should should say by default checks for user charges and then if not defaults to espaloma. |
Add a test to make sure user charges are respected by the espaloma small molecule force field
Checklist
newsentry, or the changes are not user-facing.pre-commit.ci autofixbefore requesting review.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