On Sunday 14 September 2008, Chaudhry, Charu (NIH/NICHD) [F] wrote:
> Hello,
>
> Does anyone know how to render thermal ellipsoids in rastep in a specific view, not the one arbitrarily chosen by the program? How to do this is not well documented as far as I have seen. What I have tried is to write out the rotation/transformation matrix of the view I want using molscript –gl, and put the matrix or its transpose (as a test) into the raster3d header file automatically used as input for raster3d if it is in the current directory. This changes the view from the default automatic view but does not match the view I want. My header.r3d file looks like -
> by rotation
> -0.155113 0.406792 0.900256
> -0.861109 0.390958 -0.325027
> -0.48418 -0.825635 0.28965
> translate -4.6120 -21.2290 -16.6985;
> but it is not clear to me if this is the correct format to be using, or if there is a different issue as to why the views don’t match. The 4th line of the matrix is from render output in raster3d.
Here is what I do:
1) Create a Raster3D Header file with the identity rotation matrix.
Let's call this file header.r3d
Sample is here:
http://skuld.bmsc.washington.edu/raster3d/html/render.html#sample_header
2) Matrix element [4,4] (= 0.6 in the sample) describes the total width,
in Angstroms, of the field of view. You can tweak this later on the
command line to "render" by using the -zoom option.
3) Choose a preferred view in molscript -gl, and save the matrix directly
(*not* the transpose) to a separate file in the form of a global
rotation matrix. Example is here:
http://skuld.bmsc.washington.edu/raster3d/html/render.html#obj16
The whole file will look like this:
16
ROTATION
M11 M12 M13
M21 M22 M23
M31 M32 M33
6) Create a description of the ellipsoids themselves using rastep.
The -h flag tells it not to create a new header.
rastep -Bcolor 10 30 -prob .25 < test.pdb > ellipsoids.r3d
7) Finally, make a file that joins all of these together into
a picture description that can be rendered. Let's call this
file picture_1.r3d. It will contain pointers to the
individual components:
@header.r3d
@matrix.r3d
@ellipsoids.r3d
8) Now you can render this in one command:
render < picture_1.r3d > png.r3d
The individual component files can be changed independently.
That is, you can swap another view matrix into the matrix.r3d
file, or change parameters in the header file, etc.
The master picture description picture_1.r3d and the render
command that calls it will remain the same.
Alternatives:
- This whole process can be automated from the Raster3D panel
of Xfit, capturing the current orientation and scale of the
molecule in the graphics window.
- You can do something similar using Coot, but so far as I know
it won't render the ellipsoids. (Maybe the current version does?)
But you could take the 20 lines of header records at the top of
the file created by Coot, and append them to the front of the
ellipsoids file created above.
> I run rastep from the command line using
> rastep -Bcolor 10 30 -prob .25 < test.pdb | render -png test.png
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|