Difference between revisions of "Ray Tracing"

From PyMOLWiki
Jump to navigation Jump to search
Line 10: Line 10:
 
png filename.png
 
png filename.png
 
</source>
 
</source>
 
===High Res Images===
 
The fomrula for creating images is:
 
rayVal = inches * DPI
 
where rayVal is the value you pass to "ray".  Thus, an 8 inch square photo at 72, 100, and 300 DPI would be created by the following commands:
 
ray 572,572  # 8inch * 72dpi
 
ray 800,800  # 8inch * 100dpi; or a 4inch * 200 DPI photo; or 1x800.
 
ray 2400,2400 # 8inch * 300dpi; 6"x400dpi, etc...
 
 
  
  

Revision as of 09:50, 12 May 2005

Adjusting ray trace-image size

The pymol ray tracer can generate an image of any size.

ray height,width

Example:

ray 3000,2400
png filename.png


Ray tracing maps

For better quality maps with a white background.

set ray_trace_fog,0
set ray_shadows,0
set antialias,1
ray 1600,1200
png img.png

(This will take quite a while...)

CGO label orientation

You could use the cmd.rotate and cmd.translate to position the labels, but it is likely to be somewhat painful. If I'm not mistaken, the rotation will always be about and axis through the origin and so you may need to translate the label into the correct position.

Thus if you have your label in an object called 'text', you could do,

  cmd.rotate(axis='x',angle=20.,object='text')

and repeat this with different angles, until you get the orientation correct. Then use:

  cmd.translate(vector='[1.,2.,3.]',object='text')

(using the appropriate vector, of course!) to position the label. Not ideal, but if it is sufficiently important, it can be done!