<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Thomas,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>You can label the bonds with their length with this Python:</div><div class=""><br class=""></div><div class="">from chimera import openModels, Molecule</div><div class="">for mol in openModels.list(modelTypes=[Molecule]):</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for b in mol.bonds:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>b.label = “%.2f” % b.length()</div><div class=""><br class=""></div><div class="">You can label atoms, bonds, and residues in this fashion, but there is no provision to label bond angles per se. If you meant torsion angles and wanted to add that to the bond label, you can get the floating-point dihedral value of four atoms with this code:</div><div class=""><br class=""></div><div class="">import chimera</div><div class="">dihed_val = chimera.dihedral(a1.coord(), a2.coord(), a3.coord(), a4.coord())</div><div class=""><br class=""></div><div class="">—Eric<br class=""><div class="">
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"><br class="Apple-interchange-newline"> </span>Eric Pettersen</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On May 17, 2019, at 7:02 AM, Thomas Evangelidis <<a href="mailto:tevang3@gmail.com" class="">tevang3@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size: large;">Hello,</div><div class="gmail_default" style="font-size: large;"><br class=""></div><div class="gmail_default" style="font-size: large;">Is it possible to load a small molecule in Chimera and display all bond lengths and angle values, pretty much as you can do using labelopt option for the atom names? If not directly, could you please give me some hints about how to write a Python script to do it?</div><div class="gmail_default" style="font-size: large;"><br class=""></div><div class="gmail_default" style="font-size: large;">I thank you in advance for your help.</div><div class="gmail_default" style="font-size: large;">Thomas<br class=""></div><div class="gmail_default" style="font-size: large;"><br clear="all" class=""></div><br class="">-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">======================================================================</font></span></span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">Dr. Thomas Evangelidis</font></span></span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="font-family: arial, helvetica, sans-serif; font-size: small;" class="">Research Scientist</span></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="font-family: arial, helvetica, sans-serif; font-size: small;" class=""><a href="https://www.uochb.cz/web/structure/31.html?lang=en" target="_blank" class="">IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences</a>, </span><span style="font-family: arial, helvetica, sans-serif;" class="">Prague, Czech Republic</span></p><font size="2" class=""><div class=""><font face="arial, helvetica, sans-serif" class=""><div class=""> & </div></font></div><font face="arial, helvetica, sans-serif" class=""><a href="https://www.ceitec.eu/" target="_blank" class="">CEITEC - Central European Institute of Technology</a>, </font><font face="arial, helvetica, sans-serif" class="">Brno, Czech Republic </font></font></div><div class=""><font size="2" class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></font></div><div dir="ltr" class=""><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">email: </font></span></span><a href="mailto:tevang3@gmail.com" style="font-size:small;font-family:arial,helvetica,sans-serif" target="_blank" class="">tevang3@gmail.com</a>, Twitter: <a href="https://twitter.com/tevangelidis" target="_blank" class="">tevangelidis</a>, LinkedIn: <a href="https://www.linkedin.com/in/thomas-evangelidis-495b45125/" target="_blank" class="">Thomas Evangelidis</a></p><p style="margin-bottom:0cm" align="LEFT" class=""><span style="" class=""><span style="font-family:arial,helvetica,sans-serif" class=""><font size="2" class="">website:
<a href="https://sites.google.com/site/thomasevangelidishomepage/" target="_blank" class="">https://sites.google.com/site/thomasevangelidishomepage/</a></font></span></span></p><span style="" class=""><br class=""><br class=""><br class=""></span><div style="margin-bottom: 0cm;" class="">
<br class="webkit-block-placeholder"></div>
</div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>