<div dir="ltr">Sorry, I choose chain A,B and C to get the plane on chimera.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 3:28 PM, Kavya Shankar <span dir="ltr"><<a href="mailto:kavshank@umail.iu.edu" target="_blank">kavshank@umail.iu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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 <b>chain A</b> and <b>chain B</b> to get the plane.</div><div><br></div><div><div>import chimera</div><div>import os</div><div>from cStringIO import StringIO</div><div>from StructMeasure import centroid</div><div>from StructMeasure import plane</div><div>from chimera import numpyArrayFromAtoms</div><div><br></div><div>for filename in os.listdir("test_python1"):</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>print filename<span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>model1 = chimera.openModels.open('test_<wbr>python1/'+filename)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>mol1 = model1[0]</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>p = plane(numpyArrayFromAtoms(<wbr>mol1.atoms))</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>print p.normal</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>axis = chimera.Vector(p.normal)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>angle = 120</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xf = chimera.Xform.rotation(axis,<wbr>angle)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>#matrix = chimera.Xform.getOpenGLMatrix(<wbr>xf)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>mol1.openState.localXform(xf)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>mem =StringIO()</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>chimera.pdbWrite(model1,<wbr>chimera.Xform.identity(),mem)</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>words=filename.split('_')</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>with open('test_python1/'+words[0]+<wbr>'_2.pdb','w') as f:</div><div><span class="m_-7067991986163329104gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>f.write(mem.getvalue())</div></div><div><br></div><div>Can you tell me where I am going wrong? For some proteins, it gives me the right plane and for others its different.</div><div><br></div><div>Ex:</div><div><div>1l9q_1.pdb</div><div>Opening 1l9q_1.pdb...</div><div>#3, chain A: Cu-NIR</div><div><br></div><div>#3, chain B: Cu-NIR</div><div><br></div><div>#3, chain C: Cu-NIR</div><div><br></div><div>0.98101 0.0805021 0.176463</div><div><br></div></div><div>and</div><div><br></div><div><div>Model #0 is 1l9q.pdb</div><div><br></div><div>Distance information</div><div><br></div><div>Angles/Torsions</div><div><br></div><div>Axes</div><div>axis name, length, center, direction</div><div><br></div><div>Planes</div><div>plane name, center, normal, radius</div><div>plane: ( 19.690, 39.732, 48.459) (-0.981, -0.081, -0.176) 46.305</div><div><br></div><div>Centroids</div><div>centroid name, center</div><div>centroid: ( 19.690, 39.732, 48.459)</div></div><div><br></div><div>Thanks.</div><div><br></div><div>Regards,</div><div>Kavya Shankar</div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
Chimera-dev mailing list<br>
<a href="mailto:Chimera-dev@cgl.ucsf.edu">Chimera-dev@cgl.ucsf.edu</a><br>
<a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev" rel="noreferrer" target="_blank">http://plato.cgl.ucsf.edu/<wbr>mailman/listinfo/chimera-dev</a><br>
<br></blockquote></div><br></div>