# [Chimera-users] drawing a symmetry axis

Thomas Goddard goddard at cgl.ucsf.edu
Thu Dec 11 16:49:56 PST 2008

```Hi Philip,

I don't know an easy way to show the symmetry axis of your dimer as a
line or rod using the normal Chimera commands.  But you could do this by
modifying the keyboard shortcut ai Python code.

You would edit the file

chimera/share/MatchDomains/__init__.py

or on the Mac it would be

Chimera.app/Contents/Resources/share/MatchDomains/__init__.py

(and on the Mac you'd need to click the Chimera icon and choose "Show
package contents" to see in the Chimera.app folder).

You would change the transform_schematic() routine (line 171) code from

#    tarray = ((0,1,2),(0,2,3))
tarray = ((0,1,2),(0,2,3),(0,1,5),(0,5,4),(1,2,6),(1,6,5),
(2,3,7),(2,7,6),(3,0,4),(3,4,7),(4,5,6),(4,6,7))
g1 = sm.addPiece(varray, tarray, from_rgba)
#    g1.displayStyle = g1.Mesh

from Matrix import xform_matrix, apply_matrix
tf = xform_matrix(xform)
corners2 = [apply_matrix(tf, p) for p in corners]
varray2 = corners2
g2 = sm.addPiece(varray2, tarray, to_rgba)
#    g2.displayStyle = g2.Mesh

to

#    tarray = ((0,1,2),(0,2,3))
tarray = ((0,1,1),)
#    tarray = ((0,1,2),(0,2,3),(0,1,5),(0,5,4),(1,2,6),(1,6,5),
#              (2,3,7),(2,7,6),(3,0,4),(3,4,7),(4,5,6),(4,6,7))
g1 = sm.addPiece(varray, tarray, from_rgba)
g1.displayStyle = g1.Mesh
g1.lineThickness = 3

from Matrix import xform_matrix, apply_matrix
tf = xform_matrix(xform)
corners2 = [apply_matrix(tf, p) for p in corners]
varray2 = corners2
#    g2 = sm.addPiece(varray2, tarray, to_rgba)
#    g2.displayStyle = g2.Mesh

Then restart Chimera and use the script you referred to.  It will draw a
line for the axis with width 3 pixels.  In the future we will try to add
some simpler capability to find and show symmetry axes.

Tom

Philip Wurm wrote:
> Hi,
> i have a protein dimer and i would like to show the symmetry axis. I
> found a script in this mailing list:
>
> http://www.cgl.ucsf.edu/pipermail/chimera-users/2008-October/003140.html
>
> which works quite nice. But i would like to have a nicer representation
> of my symmetry axis, not this two slabs. Just a line or thin rod would
> be nice.
>
> Does anyone know how to do this?
>
> Thanks,
> Philip
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users

```