-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enable PersesAtomMapper
#929
Conversation
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.
I just have minor comments, appart from those looks good to me :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #929 +/- ##
==========================================
- Coverage 94.32% 92.85% -1.48%
==========================================
Files 134 134
Lines 9917 9932 +15
==========================================
- Hits 9354 9222 -132
- Misses 563 710 +147
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Just the one thing from me
I noticed that the type hint for |
Sorry I don't fully understand what you mean here, could you elaborate? As far as I know we haven't ever gotten around to serializing AtomMappers (@RiesBen please correct me!). Regarding the float -> unit.Quantity, this looks like a legitimate bug being fixed, i.e. if you passed a float it should have been failed, since AtomMapper expects a quantity. I'm happy going with this unless your JSON question highlights something I've completely unware/forgotten about. |
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.
Looks good to me thanks!
oooooooh wait, we do serialize atom mappers! |
We might be getting two different cases confused, Konnector needs them to work with pickle right for the processpool? which quantities should work with. I meant JSON serialisation as I am unsure it will know what to do with a quantity but maybe that's what the to_dict method is for to work around this? |
Ah ok yes, if your concern is "will X in a gufe serializable go to JSON", in openfe/gufe we use custom codecs to do this: https://github.com/OpenFreeEnergy/gufe/blob/main/gufe/custom_codecs.py We do not have a specific codec for openmm units/quantities. In this case, the answer is to switch over to openff-units. |
This is to say @jthorton we should just do the switch to openff units now. It's an API break but I'm happy to label this as a bugfix. |
@@ -43,7 +67,7 @@ def __init__(self, allow_ring_breaking: bool = True, | |||
if mappings must strictly preserve chirality, default: True | |||
use_positions: bool, optional | |||
this option defines, if the | |||
coordinate_tolerance: float, optional | |||
coordinate_tolerance: openmm.unit.Quantity, optional |
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.
A note, we say "optional" but none of the type hints say Optional[...].. maybe that's something we should also remember to fix.
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.
Let's switch to openff units and add a news entry to make it clear we've changed the behaviour (as a bug fix).
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.
We should have an openeye runner - will need to look into what's happening |
It looks like openeye is not enabled in the testing CI from what I can follow here. |
The openeye tests are not running since this is from a fork, which won't have access to the OE license we have for CI, we can either give @jthorton write access to our repo OR I can push this branch to the repo which will then allow the tests to run. |
Thanks @mikemhenry either is fine for me! |
Let's give him write access. |
@jthorton you should have write access, go here: https://github.com/OpenFreeEnergy/openfe to accept the invite if it doesn't show up. Then you should be able to push this branch directly to our repository. |
Add the missing abstract methods for the
PersesAtomMapper
and turn on the tests.Checklist
news
entryDevelopers certificate of origin