[Chimera-users] color by height
Elaine Meng
meng at cgl.ucsf.edu
Thu Jul 4 09:37:47 PDT 2013
Hi Pedro,
I guess you are using the "Surface Color" tool, in which the "axis" field refers to the data's own coordinate system. However, the "scolor" command allows using the coordinate system of a different model than the data, which will let you do what you want.
Unfortunately it is a bit tricky, especially if you spent a lot of time generating the current positions of your models (structures and maps) and don't want to do all that again.
First, the slightly simpler case in which you don't mind repositioning all your models again. Steps:
(1) reset everything to its original untransformed position, losing the current positions (command: reset). DO NOT MOVE ANYTHING.
(2) open some reference model; it doesn't matter what, since it will be hidden, so might as well choose something simple and small. DO NOT MOVE ANYTHING.
(3) show Model Panel (under Favorites menu) and in that tool, both deactivate and hide the reference model (un-check "A"ctive and "S"hown for that model). Deactivating means it is frozen in place, and since you never moved it since resetting everything to default, its coordinate system will match the "laboratory" (display) coordinate system where X is horizontal, Y vertical, and Z in/out of screen.
(4) re-position the other models as you like
(5) use the scolor command referring to the hidden reference model's coordinate system. For example, if your displayed surface is #0 and the hidden reference model is #2:
scolor #0 geometry height axis y cmap rainbow coord #2
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/scolor.html>
At first I thought it would work to save the position of all the original models (command: savepos position_name) before opening the reference model, then restoring the position (command: reset position_name) before coloring, but that does not work because it will move the reference model along with the other models.
The only way I could think of to avoid regenerating the positions of all your models is to save transformations to a matrix file and then manually text-edit the file to un-transform the reference model:
(1) don't worry about resetting anything... with all the models in their desired positions, just open the reference model and then save all matrices to a file with command "matrixget matrix-filename" (you can also specify file location as the path before the filename)
<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/matrixset.html>
(2) in text editor, edit the transformation matrix of the reference model to no transformation, for example:
Model 2.0
1 0 0 0
0 1 0 0
0 0 1 0
(3) apply the resulting set of matrices back onto your models with command "matrixset matrix-filename" (again you can include path); only the reference model should move
(4) hide and deactivate the reference model with Model Panel as above
(5) use scolor as above
I tried both approaches just now to make sure they work as described. Sorry there are so many steps.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
On Jul 4, 2013, at 7:34 AM, p.j.depablo wrote:
> Hi everybody
> I am interested in coloring an EM volume by height. In this option you can change the origin and the axis of coloring. Specifically, I rotate t the structure untill a desired orientation. Then, I would like to choose the axis of coloring to be the same as the view axis, but can not find the viewing axis coordinates. Is there possible to find this informaton anywhere?
> Thank you in adavance.
> Pedro
More information about the Chimera-users
mailing list