
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

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

Thank You Elaine. It helped a lot! Pedro On Thu, Jul 4, 2013 at 6:37 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
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

Hi Pedro, Here's a method to color a density map surface with colors varying along the viewing direction. Use the following command (note the "-" at the end) to report the orientation of the model matrixget - then use Favorites / Reply Log to see the reported orientation and use the first 3 numbers of the last row of the 3 by 4 matrix as the coloring axis in the Surface Color dialog (with color by height), or in the scolor command. That vector is the axis pointing out of the screen expressed in coordinates of the model. The reason this method gives the desired axis is that the first 3 columns of the reported 3 by 4 matrix are a rotation mapping the model coordinates to the screen coordinates. The inverse of that matrix maps screen coordinates to model coordinates and the axis we want is obtained by mapping the screen z axis to model coordinates, and that is the last column of the inverse matrix. Since the inverse of a rotation matrix equals the transpose of that matrix, the desired axis is the last row of the 3x3 rotation matrix. Tom On Jul 4, 2013, at 7:34 AM, p.j.depablo <p.j.depablo@gmail.com> 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 _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (3)
-
Elaine Meng
-
p.j.depablo
-
Tom Goddard