[Chimera-users] display bond lengths and angles
Eric Pettersen
pett at cgl.ucsf.edu
Fri May 17 11:13:50 PDT 2019
Hi Thomas,
You can label the bonds with their length with this Python:
from chimera import openModels, Molecule
for mol in openModels.list(modelTypes=[Molecule]):
for b in mol.bonds:
b.label = “%.2f” % b.length()
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:
import chimera
dihed_val = chimera.dihedral(a1.coord(), a2.coord(), a3.coord(), a4.coord())
—Eric
Eric Pettersen
UCSF Computer Graphics Lab
> On May 17, 2019, at 7:02 AM, Thomas Evangelidis <tevang3 at gmail.com> wrote:
>
> Hello,
>
> 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?
>
> I thank you in advance for your help.
> Thomas
>
>
> --
> ======================================================================
> Dr. Thomas Evangelidis
> Research Scientist
> IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en>, Prague, Czech Republic
> &
> CEITEC - Central European Institute of Technology <https://www.ceitec.eu/>, Brno, Czech Republic
>
> email: tevang3 at gmail.com <mailto:tevang3 at gmail.com>, Twitter: tevangelidis <https://twitter.com/tevangelidis>, LinkedIn: Thomas Evangelidis <https://www.linkedin.com/in/thomas-evangelidis-495b45125/>
> website: https://sites.google.com/site/thomasevangelidishomepage/ <https://sites.google.com/site/thomasevangelidishomepage/>
>
>
>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20190517/2ecf9636/attachment.html>
More information about the Chimera-users
mailing list