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

Standardise crosslinking classes #214

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

Standardise crosslinking classes #214

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

Comments

@sethaxen
Copy link
Contributor

sethaxen commented Oct 7, 2016

IMP.pmi.restraints.crosslinking.AtomicCrossLinkMSRestraint and IMP.pmi.restraints.crosslinking.CrossLinkingMassSpectrometryRestraint share a great deal of code and do similar things but have trivial differences in implementation and variable names. It would probably be worthwhile to unify the classes by either having a single class with a flag that differentiates between the two uses or a base class that handles all common functionality and children that differentiate the two restraint uses.

@benmwebb
Copy link
Member

benmwebb commented Oct 7, 2016

Agreed. I'd be very wary of making major changes to either class though unless we have good coverage first - otherwise we don't know if we broke something.

@sethaxen
Copy link
Contributor Author

sethaxen commented Oct 11, 2016

I agree. There's a lot to untangle there too. I'll start documenting the things that confuse me as I uncover them.

For some reason, CrossLinkingMassSpectrometryRestraint adds its linear restraint self.rslin to the model and output, even though a comment indicates that this is a dummy restraint for visualization. AtomicCrossLinkMSRestraint has a linear restraint set self.rs_lin, which is never used and is not returned by get_restraint_for_rmf. In fact, get_restraint_for_rmf is not implemented at all. Instead, there's a method called create_restraints_for_rmf which creates dummy restraints, but this doesn't seem to be called anywhere in PMI.

@Pellarin
Copy link
Collaborator

For some reason, CrossLinkingMassSpectrometryRestraint adds its linear
restraint self.rslin to the model

Absolutely, it shouldn't be. However, the slope is set to zero, so it does
not affect the modeling.

Riccardo Pellarin, PhD

Institut Pasteur
CNRS UMR 3528
25, rue du Docteur Roux
75724 Paris Cedex 15, France
[email protected]
+33 (0)1 44 38 93 63

On Tue, Oct 11, 2016 at 8:46 PM, Seth Axen [email protected] wrote:

I agree. There's a lot to untangle there too. I'll start documenting the
things that confuse me as I uncover them.

For some reason, CrossLinkingMassSpectrometryRestraint adds its linear
restraint self.rslin to the model, even though a comment
https://github.com/salilab/pmi/blob/9af974/pyext/src/restraints/crosslinking.py#L92
indicates that this is a dummy restraint for visualization.
AtomicCrossLinkMSRestraint has a linear restraint set self.rs_lin, which
is never used and is not returned by get_restraint_for_rmf. In fact,
get_restraint_for_rmf is not implemented at all. Instead, there's a
method called create_restraints_for_rmf which creates dummy restraints,
but this doesn't seem to be called anywhere in PMI.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#214 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACXOkO55WcT1xaPFORMAgcNfz5d9WFR3ks5qy9l1gaJpZM4KRibe
.

@cgreenberg
Copy link
Collaborator

I suggest deleting PMI::restraints::AtomicCrossLinkingRestraint and just calling the core code (which references isd::AtomicCrossLinkingRestraint) using a flag from CrossLinkingMSRestraint. Other than a small change in the scoring function, the data structure should be the same. This is my fault; I added a bunch of debugging stuff to the Atomic restraint which isn't needed.

@sethaxen sethaxen self-assigned this Jun 23, 2018
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

4 participants