# [chimera-dev] [Chimera-users] drawing a symmetry axis

Mili Shah mishah at loyola.edu
Fri Dec 12 05:11:53 PST 2008

```Hi All--

A tech report of our generalized paper can be found here:

http://www.caam.rice.edu/tech_reports/2007/TR07-17.pdf

I would be happy to discuss the code to anyone that is interested in
applying the symmetry preserving SVD to their work.

Thanks!

Mili

On Thu, 11 Dec 2008, Dan Sorensen wrote:

> Mark,
>
> Thanks for alerting us to this.
>
> We are most definitely interested in
> learning of applications of this symmetry
> preserving SVD.   Mili has completely
> generalized this and there is Matlab code
> We would be very interested in helping
> to make this code useful for this
> application.
> Best,
>
> Dan
>
> Mark Moll wrote:
>> Tom (and other Chimera developers),
>>
>> You might be interested in the paper below. It describes a method for
>> computing the best axis of symmetry and computing a `symmetrized' version
>> of a symmetric complex (i.e. with deviations from symmetry removed). They
>> have extended the analysis since this paper appeared to other forms of
>> symmetry, but this hasn't appeared yet, AFAIK. (The authors are cc-ed in
>> case they want to follow up.) The first author may have a reference matlab
>> implementation that could probably without too much trouble be converted
>> into python using numpy.
>>
>> @article{shah2006a-symmetry-preserving-singular-value,
>>     Abstract = {A reduced order representation of a large data set is often
>> realized through a principal component analysis based upon a singular value
>> decomposition (SVD) of the data. The left singular vectors of a truncated
>> SVD provide the reduced basis. In several applications such as facial
>> analysis and protein dynamics, structural symmetry is inherent in the data.
>> Typically, reflective or rotational symmetry is expected to be present in
>> these applications. In protein dynamics, determining this symmetry allows
>> one to provide SVD major modes of motion that best describe the symmetric
>> movements of the protein. In face detection, symmetry in the SVD allows for
>> more efficient compression algorithms. Here we present a method to compute
>> the plane of reflective symmetry or the axis of rotational symmetry of a
>> large set of points. Moreover, we develop a symmetry preserving singular
>> value decomposition (SPSVD) that best approximates the given set while
>> respecting the symmetry. Interesting subproblems arise in the presence of
>> noisy data or in situations where most, but not all, of the structure is
>> symmetric. An important part of the determination of the axis of rotational
>> symmetry or the plane of reflective symmetry is an iterative reweighting
>> scheme. This scheme is rapidly convergent in practice and seems to be very
>> effective in ignoring outliers (points that do not respect the symmetry).
>> },
>>     Author = {Mili I. Shah and Danny C. Sorensen},
>>     Doi = {10.1137/050646676},
>>     Journal = {{SIAM} Journal on Matrix Analysis and Applications},
>>     Number = {3},
>>     Pages = {749--769},
>>     Title = {A Symmetry Preserving Singular Value Decomposition},
>>     Url = {http://link.aip.org/link/?SML/28/749/1},
>>     Volume = {28},
>>     Year = {2006}
>> }
>>
>>
>> On Dec 11, 2008, at 6:49 PM, Thomas Goddard wrote:
>>
>>> 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
>>> _______________________________________________
>>> Chimera-users mailing list
>>> Chimera-users at cgl.ucsf.edu
>>> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
>>>
>>
>

```

More information about the Chimera-dev mailing list