-
Notifications
You must be signed in to change notification settings - Fork 83
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
Restraint forces #336
Restraint forces #336
Conversation
@andrrizzi : Is this PR ready for review? |
Yep! |
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 great, will this wind up replacing some of the Restraint classes in yank eventually?
If you have the |
I don't think so. I think the classes in YANK will keep serving the role of restraint factories that create these force objects, add automatic determination of the parameters, and parse DSL/SMIRKS strings (through the
Ok, thanks! I'll merge this, see what gets generated automatically, and finish up the docs update in a separate PR. |
This PR seems to have removed the generic |
I believe that is correct. Apologies for the lack of advance warning! OpenMM added support for serializing/deserializing Python subclasses of @andrrizzi : What do you think about creating a bugfix release that restores |
I think that the extent of our use is: If there's now a better way to accomplish that, based on pure OpenMM, it would probably be better for us to do that (at least, long term). Will In any case, we might keep a variant of the function linked above to support older versions of OpenMM. But even that looks like it might be a 1-line fix, so if we're the only ones suffering the problem, it'll be as easy to fix it on our end as for you to push a bugfix.
No worries -- API changes are expected when we're using a version |
Apologies for the change. The |
The main thing in this PR is the addition in the
forces.py
module of restraint forces as anticipated in #328. These forces provide a common interface that will allow us in YANK's analysis module to reweight radially-symmetric restraints without implementing non-extensible hacks to figure out the restraints properties (cc choderalab/yank#882). The most important feature introduced is the ability to compute the standard state correction with an energy/radius cutoff and reweighting to a square-well potential.Other smaller things in this PR:
deepcopy()
forces.find_forces()
that should be handy to extract forces from an OpenMM system by class/name.Do I have to manually update the list of classes in the docs or are they automatically generated?