See the "connectivity restraint" example (under simple examples) to get started. To replicate Frank's restraint you need another layer of conditionality which can be done by chaining the LowerRefinedPairScores something like
ps= IMP.core.SphereDistancePairScore(IMP.core.HarmonicUpperBound(0,1)) cps= IMP.core.ChildrenParticleRefiner() # find the closest pair connecting two instances of two proteins ilrps = IMP.misc.LowestRefinedPairScore(cps,ps) # find the closest instances of two proteins lrps = IMP.misc.LowestRefinedPairScore(cps,lrps) cr = IMP.core.ConnectivityRestraint(lrps) cr.set_particles(hs) m.add_restraint(cr)
and ensuring that your molecular hierarchy looks like - all proteins of type a - first protein of type a - leaf representations of first protein of type a ... - second protein of type a ... - third protein of type a ... - all proteins of type b - first protein of type b ... - all proteins of type c ...
And putting the "all proteins of type x" particles in the ConnectivityRestraint.
If such a hierarchy organization is problematic than we should talk some more. At the moment there is a shortage of other ParticleRefiners so you have little choice on your organization scheme. I have a table based particle refiner somewhere (so you could replace the first level of ChildrenParticleRefiner with a non-MolecularHierarchy based approach), but it never got committed during the reorg.
The other thing to be aware of is that, if you are using a derivative- based optimizer, the evaluation is not very efficient (in that the closest pair is found twice). Let me know if it becomes too slow and I'll put some effort into figuring out a way to avoid this problem.
Does this all make sense?
On Dec 18, 2008, at 12:14 AM, Friedrich Foerster wrote:
> hi there, > > is there any example for generating ambiguous restraints in imp? > i want to deal with a 'frank classic': multiple copies of a specific > protein exist in an assembly and only one instance interacts with > another protein (the one that is closer to its putative partner). i > guess npc people need it every day. > > thanks > > frido > > -- > > Friedrich Foerster > Max-Planck Institut fuer Biochemie > Am Klopferspitz 18 > D-82152 Martinsried > > Tel: +49 89 8578 2651 > Fax: +49 89 8578 2641 > > foerster@biochem.mpg.de > > www.tomotronic.org > > > > > > > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev