Hi,I have to find the normal of the protein and I am writing a python script that can do this. But when I run it, the normal is different. On chimera, I select chain A and chain B to get the plane.import chimeraimport osfrom cStringIO import StringIOfrom StructMeasure import centroidfrom StructMeasure import planefrom chimera import numpyArrayFromAtomsfor filename in os.listdir("test_python1"):print filenamemodel1 = chimera.openModels.open('test_python1/'+filename) mol1 = model1[0]p = plane(numpyArrayFromAtoms(mol1.atoms)) print p.normalaxis = chimera.Vector(p.normal)angle = 120xf = chimera.Xform.rotation(axis,angle) #matrix = chimera.Xform.getOpenGLMatrix(xf) mol1.openState.localXform(xf)mem =StringIO()chimera.pdbWrite(model1,chimera.Xform.identity(),mem) words=filename.split('_')with open('test_python1/'+words[0]+'_2.pdb','w') as f: f.write(mem.getvalue())Can you tell me where I am going wrong? For some proteins, it gives me the right plane and for others its different.Ex:1l9q_1.pdbOpening 1l9q_1.pdb...#3, chain A: Cu-NIR#3, chain B: Cu-NIR#3, chain C: Cu-NIR0.98101 0.0805021 0.176463andModel #0 is 1l9q.pdbDistance informationAngles/TorsionsAxesaxis name, length, center, directionPlanesplane name, center, normal, radiusplane: ( 19.690, 39.732, 48.459) (-0.981, -0.081, -0.176) 46.305Centroidscentroid name, centercentroid: ( 19.690, 39.732, 48.459)Thanks.Regards,Kavya Shankar
_______________________________________________
Chimera-dev mailing list
Chimera-dev@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev