[Chimera-users] computing dihedrals difference along simulation

Eric Pettersen pett at cgl.ucsf.edu
Mon Apr 8 16:17:15 PDT 2013

On Apr 5, 2013, at 7:43 AM, Ignacio Faustino wrote:

> Dear Chimera users,
> I would like to know if there is a easy way to compute the difference between a couple of dihedrals a color a residue depending on the result.
> I guess I have to do some python scripting but just in case I want to ask.

Hi Ignacio,
	In very narrow cases you can without resorting to Python.  Namely when the dihedrals you want to compare are in the same residue and are either the phi, psi, or chi angles.  In that case you can use the Attribute Calculator tool to make a new residue attribute that is the difference (e.g. formula: residue.phi - residue.psi) and then use Render By Attribute to color the residues based on this new attribute.
	Otherwise, you will have to resort to Python.  Look at the "Atomic Measurements" programmer's example -- specifically the documentation for chimera.dihedral in the Basic Measurements Functions -- for details.  Feel free to ask questions on chimera-dev.  You can have your script just compute a residue attribute and then afterward you would use Render By Attribute to set the actual coloring (and see the histogram of values).  Since a difference of angles can range from -360 to 360 you should probably normalize the values back into a -180 to 180 range.


                        Eric Pettersen
                        UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130408/3bc166fd/attachment.html>

More information about the Chimera-users mailing list