salilab / pmi

Python Modeling Interface
https://integrativemodeling.org/nightly/doc/ref/namespaceIMP_1_1pmi.html
12 stars 11 forks source link

Separate IMP.Restraint and PMI restraint classes #211

Open sethaxen opened 8 years ago

sethaxen commented 8 years ago

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 commented 8 years ago

@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.

benmwebb commented 8 years ago

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