Frido - this is how it should look like:#create the two proteinsprot_ps=IMP.Particles()prot_ps.append(IMP.Particle(m))prot_ps.append(IMP.Particle(m))prot1= IMP.atom.Hierarchy.setup_particle(prot_ps[0],IMP.atom.Hierarchy.PROTEIN)
prot2= IMP.atom.Hierarchy.setup_particle(prot_ps[1],IMP.atom.Hierarchy.PROTEIN)#make the parts fragments and add to the molecules
for e in [part1,part2,part3]:fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT)#also make sure the part has radius prot1.add_child(fh)for e in [part4,part5,part6]:fh= IMP.atom.Hierarchy.setup_particle(e,IMP.atom.Hierarchy.FRAGMENT)#also make sure the part has radius prot2.add_child(fh)
#create the restraintufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.)
cps= IMP.core.ChildrenRefiner(IMP.atom.Hierarchy.get_traits()) lrps = IMP.misc.LowestRefinedPairScore(cps,ufu) connrest = IMP.core.ConnectivityRestraint(lrps)
connrest.set_particles(prot_ps)
m.add_restraint(connrest)
On Sep 21, 2009, at 6:54 AM, Daniel Russel wrote:I think the problem is that the list of particles the connectivity restraint ends up with is [p0,p1...p5]. You should just give it two particles, one for each protein (with radius and center computed from a sphere cover, or with the distance computed using a particle refiner). I doubt the code below ever really did what you wanted (although it might have happened to agree:-)
I can explain better once I'm back in the US in two days.
On Sep 21, 2009, at 2:30 PM, Friedrich Foerster <foerster@biochem.mpg.de> wrote:hi all,i noticed that the connectivity restraint must have changed at some point:i want to impose a restraint on two proteins, each consisting ofseveral particles. thus, i am interested in restraining the closestpair between the two proteins. whereas the following code did what ineed previously it now calculates all against all distances (includingintra-protein distances) - which is not what i want.i'd be grateful if anyone could tell me how i need to change my pseudo code:prot1 = [part1,part2,part3]prot2 = [part4,part5,part6]ufu = IMP.core.TruncatedHarmonicUpperBound( span, k, stddev, 2.)pairsc = IMP.core.SphereDistancePairScore(ufu, IRAD_KEY)connrest = IMP.core.ConnectivityRestraint(pairsc)for pps in [prot1,prot2]:connrest.add_particles(pps)to be explicit: the code now restrains distances in prot1 and prot2,which is what i do not want. i only want the inter-protein distancesto be considered...thanksfrido--Dr. Friedrich FoersterMax-Planck Institut fuer BiochemieAm Klopferspitz 18D-82152 MartinsriedTel: +49 89 8578 2651Fax: +49 89 8578 2641foerster@biochem.mpg.dewww.tomotronic.org_______________________________________________IMP-dev mailing listIMP-dev@salilab.orghttps://salilab.org/mailman/listinfo/imp-dev_______________________________________________
IMP-dev mailing list
IMP-dev@salilab.org
https://salilab.org/mailman/listinfo/imp-dev