Crystallography‎ > ‎Molecular graphics‎ > ‎Pymol‎ > ‎

Ray-trace


Ray-trace from command line

Use:

pymol -qc pymol.pse -d 'set grid_mode, 1; \ 
set grid_slot, 1, obj1; set grid_slot, 1, obj2; \ 
set grid_slot, 2, obj3; scene F1; disable obj3; \ 
ray 1280, 1024; png obj1234_00a.png; disable obj1; \
disable obj2; enable obj3; ray 1280, 1024; \ 
png obj1234_00b.png; quit' 

Or replace:

ray H,W; png name.png

with:

png name.png, height=H, width=W, ray=1


Ray_trace modes (B&W Molscript & D.Goodsell look-alike)

set ray_trace_mode= 

and select one of the options 0/1/2/3

Examples:



Check out the wiki for more info and some examples


IMPORTANT for "ray_trace mode 1"

To decrease the thickness of the black outline:

get ray_trace_gain
set ray_trace_gain, 0.005


Stereo pair for publication

stereo walleye
ray

Stereo the old way

Ray trace and save two images, left and right, as follows:

ray angle=-3
png image1-left.png

ray angle=3
png image2-right.png

Put the two pictures (left and right) side by side in an image editing program (Gimp or Photoshop), 6.5 - 7 cm apart from each other.

Photo effect 

set_color oxygen, [1.0,0.4,0.4]
set_color nitrogen, [0.5,0.5,1.0]
remove solvent
as spheres
util.cbaw
bg white
set light_count,10
set spec_count,1
set shininess, 10
set specular, 0.25
set ambient,0
set direct,0
set reflect,1.5
set ray_shadow_decay_factor, 0.1
set ray_shadow_deday_range, 2
unset depth_cue
viewport 400,400