[Chimera-users] Unit cell coordinates, Python / Chimera

Tom Goddard goddard at cgl.ucsf.edu
Wed Mar 5 11:51:42 PST 2008


Hi Rachel,

  Attached is Python code that prints the unit cell axes of open PDB 
models to the reply log.  You open the PDB models, then open this 
script, and the results appear in the reply log (menu Favorites / Reply 
Log), for example:

1a0m.pdb unit cell axes
   a axis =   44.400    0.000    0.000
   b axis =    0.000   44.400    0.000
   c axis =    0.000    0.000   23.500

I figured out the needed Chimera calls by looking at the Chimera Python 
code for the Unit Cell tool located in your Chimera distribution in

    chimera/share/UnitCell/__init__.py

and I homed in on the show_outline_cb() function to quickly figure out 
the attached code.   On the Mac this code is in 
Chimera.app/Contents/Resources/share/UnitCell/__init__.py and to look 
inside the Chimera.app folder  click on its icon with the ctrl key held 
and select "Show Package Contents".

    Tom

> *From: *Rachel Karchin 
> *Date: *March 4, 2008 5:42:36 PM PST
>
> Me again.  Is there a way to get the coordinates of the unit cell 
> vertices or the plane equation from Chimera running through a python 
> script?
>
> Tx!!
>
> -- rk

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cell.py
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20080305/02315c3c/attachment.ksh>


More information about the Chimera-users mailing list