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

Separate IMP.Restraint and PMI restraint classes #211

Open
sethaxen opened this issue Oct 4, 2016 · 2 comments
Open

Separate IMP.Restraint and PMI restraint classes #211

sethaxen opened this issue Oct 4, 2016 · 2 comments
Assignees

Comments

@sethaxen
Copy link
Contributor

sethaxen commented Oct 4, 2016

In general, PMI restraints are wrappers around and not children of IMP.Restraint. There are a few children of IMP.Restraint which are not PMI restraints (they do not implement, e.g. get_output()). However, two classes, TorqueRestraint and CylinderRestraint, inherit IMP.Restraint but implement PMI restraint methods. In the interest of having a unified PMI restraint base class, a pure IMP.Restraint version of these should be implemented and then wrapped as with other PMI restraint classes.

@sethaxen
Copy link
Contributor Author

@benmwebb I'm considering implementing more general forms of TorqueRestraint, CylinderRestraint, and BiStableDistanceRestraint in C++ (just the IMP.Restraint functionality, seems pretty straightforward) and replacing the classes in IMP.pmi.restraints.basic with PMI-style wrappers around these restraints. Usage and behavior should be the same. But I'm wondering if a different module, e.g. IMP.core, would be a better place for them or if you have a better idea.

@sethaxen sethaxen self-assigned this Oct 12, 2016
@benmwebb
Copy link
Member

Sure, PMI is for high-level modeling, not a dumping ground for random classes. It sounds like core is a better place for these.

sethaxen added a commit to salilab/imp that referenced this issue Oct 13, 2016
This unary function will permit, for example, multi-well harmonic
potentials. Added to generalize
`IMP.pmi.restraints.basic.BiStableDistanceRestraint`.
Relates salilab/pmi#211
sethaxen added a commit to salilab/imp that referenced this issue Oct 16, 2016
This unary function permits the calculation of the
weighted sum of negative exponential of multiple
unary functions, useful when the output of the functions
is a score, -log(p). Added to generalize
`IMP.pmi.restraints.basic.BiStableDistanceRestraint`.
Relates salilab/pmi#211
sethaxen added a commit to sethaxen/pmi that referenced this issue Oct 16, 2016
`BiStableDistanceRestraint` inherited `IMP.Restraint` and was
not a PMI-style restraint. A general NStableDistanceRestraint
that inherits the new PMI restraint base class was
created, and BiStableDistanceRestraint inherits that class.
Relates salilab#211, salilab#156
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

No branches or pull requests

2 participants