[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-users] Strange Pair Restraint behaviour



I can't see any obvious issues with your code. What version of IMP are you using? Can you look at the coordinates of the particles for the pair restraints to make sure that they are being properly updated as part of the rigid body. You can use the IMP.display module to output markers to Pymol or Chimera to make sure things look as you expect.

If you are still stuck, my suggestion would be to try to produce a cut down version of your script that illustrates the problem (and maybe a saved configuration to avoid the optimization). 

If you don't figure out what the problem is while producing the cut down script, post to the list so I and others can check it out.
              --Daniel

On Apr 10, 2011, at 4:33 AM, Iain Moal wrote:

> Hello IMP users,
> My pair restraints aren’t behaving as they should.  I have a system with multiple domains which I want to move as rigid bodies while having a pair restraint between the end of the first domain and the beginning of the next. My input .pdb files are coarse-grained using IMP.atom.create_simplified_along_backbone.  My approach was to take the coordinates of the alpha carbons I want to restrain, add the two points into my coarse-grained RigidBody objects, and add a pair restraint between them, see the following code.  The funny thing is, as my initial .pdb files satisfy this restraint, an initial energy evaluation comes out as zero, as it should do.  However, if I perturb the system and minimise with the MC mover, the energy starts high and reduces down to almost zero, as it should, but the distances between adjacent domains of the final structure are much higher than they should be – often over 20A away from the HarmonicUpperBound.  I have set my_MC_optimiser.set_return_best(True), so this isn’t the reason.  Does anyone have any idea what is wrong?
> 
> Many thanks,
> Iain Moal
> 
> 
> Hingedata = [[9,0,34.885,-57.443,9.494,23.464,-48.297,6.885],… and so on] 
> rigbods=[]
> for abcd in IMP.atom.get_by_type(all, IMP.atom.CHAIN_TYPE):
>        rigbods.append(IMP.core.RigidBody(IMP.Decorator.get_particle(IMP.atom.Hierarchy.get_as_chain(abcd))))
> for x in hingedata:
>        p1 = IMP.Particle(m)
>        p2 = IMP.Particle(m)
>        XYZ_a= IMP.core.XYZR.setup_particle(p1,IMP.algebra.Sphere3D(IMP.algebra.Vector3D(x[2],x[3],x[4]),0.01))
>        XYZ_b= IMP.core.XYZR.setup_particle(p2,IMP.algebra.Sphere3D(IMP.algebra.Vector3D(x[5],x[6],x[7]),0.01))
>        #NB) THIS DOESN’T WORK HERE: XYZ_a= IMP.core.XYZ.setup_particle(p1,IMP.algebra.Vector3D(x[2],x[3],x[4]))
>        # NB) THIS DOESN’T WORK HERE:XYZ_b= IMP.core.XYZ.setup_particle(p2,IMP.algebra.Vector3D(x[5],x[6],x[7]))
>        rigbods[x[0]].add_member(XYZ_a)
>        rigbods[x[1]].add_member(XYZ_b)
>        r= IMP.core.PairRestraint(IMP.core.DistancePairScore(IMP.core.HarmonicUpperBound(20,5.0)),IMP.ParticlePair(p1,p2))
>        m.add_restraint(r)
> 
> 
> I read my .pdb files using this: all.add_child(create_from_pdb(“filename”))
> 
> def create_from_pdb(file):
>            t=IMP.atom.read_pdb(file, m, IMP.atom.ATOMPDBSelector())
>            IMP.atom.add_radii(t)
>            c=IMP.atom.Chain( IMP.Decorator.get_particle(IMP.atom.Hierarchy.get_as_chain(IMP.atom.get_by_type(t, IMP.atom.CHAIN_TYPE)[0] )))
>            s=IMP.atom.create_simplified_along_backbone(c,4) 
>            IMP.atom.destroy(t)
> IMP.Decorator.get_particle(IMP.atom.Hierarchy.get_as_chain(IMP.atom.get_by_type(s, IMP.atom.CHAIN_TYPE)[0] ))
>            rb=IMP.atom.setup_as_rigid_body(s)
>            rb.set_coordinates_are_optimized(True)
>            return s
> 
> This communication is from Cancer Research UK. Our website is at www.cancerresearchuk.org. We are a registered charity in England and Wales (1089464) and in Scotland (SC041666) and a company limited by guarantee registered in England and Wales under number 4325234. Our registered address is Angel Building, 407 St John Street, London, EC1V 4AD. Our central telephone number is 020 7242 0200.
> 
> This communication and any attachments contain information which is confidential and may also be privileged.   It is for the exclusive use of the intended recipient(s).  If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful.  If you have received this communication in error, please notify the sender and delete the email and destroy any copies of it.
> 
> E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept liability for any such matters or their consequences.  Anyone who communicates with us by e-mail is taken to accept the risks in doing so.
> 
> _______________________________________________
> IMP-users mailing list
> 
> https://salilab.org/mailman/listinfo/imp-users