## Re: [PyMOL] asymmetric transformation matrices

 Re: [PyMOL] asymmetric transformation matrices From: Thomas Evangelidis - 2009-11-09 15:05:52 ```Well practically speaking the opposite superimpositions are not performed in the same fashion. Lets take 1ONE and 2ONE as an example, 2 different conformations of the same molecule. Since the aa composition is identical (at least from what I've seen the chains have the same length), I measured the distances between Ca atoms of 1ONE and 2ONE after "align 1ONE and chain A, 2ONE and chain A", and the respective distances after "align 2ONE and chain A, 1ONE and chain A". The RMSD is 0.230642045187 which implies that the 2 chains are not in relative positions after 1ONEx2ONE and 2ONEx1ONE. Here's the function I 've written to do that: # a function to measure Ca distances of oposite pairs of superimpossed chains (the proteins must have the same aa composition) def check_for_symmetry(tstruct, qstruct): # align the pair cmd.fetch(tstruct) cmd.extract(pdb2entry[tstruct]+"1", tstruct + " and chain "+ pdb2entry[tstruct][-1:] + " and not hetatm") cmd.fetch(qstruct) cmd.extract(pdb2entry[qstruct]+"1", qstruct +" and chain "+ pdb2entry[qstruct][-1:] + " and not hetatm") print "Aligning "+pdb2entry[tstruct]+"1"+" with "+pdb2entry[qstruct]+"1" cmd.align(pdb2entry[tstruct]+"1", pdb2entry[qstruct]+"1") #cmd.do("cealign "+pdb2entry[qstruct]+"1, "+pdb2entry[tstruct]+"1") # align the symmetric pair cmd.fetch(tstruct) cmd.extract(pdb2entry[tstruct]+"2", tstruct + " and chain "+ pdb2entry[tstruct][-1:] + " and not hetatm") cmd.fetch(qstruct) cmd.extract(pdb2entry[qstruct]+"2", qstruct +" and chain "+ pdb2entry[qstruct][-1:] + " and not hetatm") print "Aligning "+pdb2entry[qstruct]+"1"+" with "+pdb2entry[tstruct]+"1" cmd.align(pdb2entry[qstruct]+"2", pdb2entry[tstruct]+"2") #cmd.do("cealign "+pdb2entry[qstruct]+"2, "+pdb2entry[tstruct]+"2") # measure distances pymol.stored.protein_dict = {} cmd.iterate(pdb2entry[tstruct]+"1", "stored.protein_dict[(chain,resi)]=1") Residues = pymol.stored.protein_dict.keys() Residues.sort() RMSD = 0 for res in Residues: chain = res[0] resi = res[1] dist1 = cmd.distance('tmp',pdb2entry[tstruct]+"1 and chain "+chain+" and resi "+resi+" and name ca",pdb2entry[qstruct]+"1 and chain "+chain+" and resi "+resi+" and name ca") dist2 = cmd.distance('tmp',pdb2entry[tstruct]+"2 and chain "+chain+" and resi "+resi+" and name ca",pdb2entry[qstruct]+"2 and chain "+chain+" and resi "+resi+" and name ca") print "The difference in distance betweem residue IDs ", resi," is : ",dist1, "-",dist2," = ",dist1-dist2 RMSD += (dist1-dist2)**2 RMSD = sqrt(RMSD/len(Residues)) print "RMSD of distances between identical residues in 1ONE x 2ONE and this in 2ONE x 1ONE: ", RMSD check_for_symmetry("1ONE", "2ONE") PS: Jason, I suspect the same happens with CEalign although I couldn't manage to run it for technical reasons, but by looking at the transformation matrices produced by the stand-alone version, the translation vectors are not opposite. > Hi Thomas, > > Say, the first system is x and the second y, where y=R(x+s) is the > first transformation. Then the reverse transformation follows as > > y = R(x + s) > y = Rx + Rs > Rx = y - Rs > x = t(R)(y-Rs) > > Note that that is also equal to: x = t(R)y - s > > Hope it helps, > > Tsjerk > > On Mon, Nov 9, 2009 at 1:09 AM, Thomas Evangelidis > wrote: >> Dear pymol users, >> >> I noticed something strange when superimposing 2 opposite pairs of >> chains. E.g. >> >> DEBUG: template  1BQG_A  query  2MUC_A >> Query Transformation: >>         X2 = +0.86747*(X1+2.29751) + -0.49574*(Y1+60.99794) + >> -0.04181*(Z1+64.71239) >>         Y2 = -0.49701*(X1+2.29751) + -0.85983*(Y1+60.99794) + >> -0.11697*(Z1+64.71239) >>         Z2 = +0.02204*(X1+2.29751) + +0.12225*(Y1+60.99794) + >> -0.99226*(Z1+64.71239) >> >> >> DEBUG: template  2MUC_A  query  1BQG_A >> Query Transformation: >>         X2 = +0.86747*(X1+30.95128) + -0.49701*(Y1+61.15895) + >> +0.02204*(Z1+56.70381) >>         Y2 = -0.49574*(X1+30.95128) + -0.85983*(Y1+61.15895) + >> +0.12225*(Z1+56.70381) >>         Z2 = -0.04181*(X1+30.95128) + -0.11697*(Y1+61.15895) + >> -0.99226*(Z1+56.70381) >> >> Although looking at the rotation matrices one is the transpose of the >> other, the translation vectors are not opposite. Can someone explain >> that? >> >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> PyMOL-users mailing list (PyMOL-users@...) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pymol-users@... >> > > > > -- > Tsjerk A. Wassenaar, Ph.D. > Junior UD (post-doc) > Biomolecular NMR, Bijvoet Center > Utrecht University > Padualaan 8 > 3584 CH Utrecht > The Netherlands > P: +31-30-2539931 > F: +31-30-2537623 > ----- End message from tsjerkw@... ----- ```