-
Notifications
You must be signed in to change notification settings - Fork 11
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
What to do with selection tuples? #145
Comments
Yes, but we still need backcompatibility. How can we prevent to broke previous code? |
Why not just pass a Selection object to each PMI restraint, rather than passing Selection-like parameters (e.g. resolution, residue indices) to each one? |
I'm all for that. Only problem is that many PMI restraints do the selecting for you - they read in data and select within the passed hierarchy. E.g. crosslink data or elastic networks on SSE elements. Maybe the way to do it is have PMI helper functions which create a selection from input data? |
Perhaps... or we make Selection itself more flexible. |
Proposal after talking with @saltzberg : have all data parsers in IO (including xldb = IMP.pmi.io.crosslink.CrossLinkDataBase()
xldb.create_set_from_file("xlinks.csv")
pps = xldb.select(hier,resolution=0,atom_type=IMP.atom.AtomType("NZ"))
r = IMP.pmi.restraints.CrossLinkingMassSpectrometryRestraint(particle_pair_lists=pps,
slope=0.0,
length=21.0,
label="XL") Thoughts? |
|
I'd have it internally call IMP Selection and just pass the kwargs on. |
So in PMI1 a restraint is typically set up with:
Then the restraint internally does the selection. But now in PMI2 we have nice "handles" and also IMP Selection works great with all resolutions (including densities). We could now just have all restraints be set up like so:
So we'd get rid of selection tuples altogether. What do you think? @Pellarin ?
The text was updated successfully, but these errors were encountered: