Gallery: Difference between revisions
Jump to navigation
Jump to search
Marcocamma (talk | contribs) m (Correct typo "deday"->"decay") |
No edit summary |
||
Line 5: | Line 5: | ||
|- | |- | ||
|} | |} | ||
{{GalleryImage | |||
|image=Image_merged.png|size=200px|title=A "Sliced" Image|description=A more complex example of how to create an image of a slice. | |||
|cmdString=<source lang="python"> | |||
# example script for creation of an image with a slice region | |||
load $PYMOL_PATH/test/dat/1tii.pdb | |||
orient | |||
# must disable depth cue and shadows | |||
unset depth_cue | |||
unset ray_shadows | |||
set ray_trace_mode, 0 | |||
# this controls the z depth of the slice plane | |||
# (sets it halfway between the clipping planes) | |||
fraction = 0.42 | |||
view = cmd.get_view() | |||
near_dist = fraction*(view[16]-view[15]) | |||
far_dist = (view[16]-view[15]) - near_dist | |||
cmd.clip("near", -near_dist) | |||
# render opaque background image | |||
as surface | |||
set ray_interior_color, grey80 | |||
set opaque_background | |||
set surface_color, white | |||
ray | |||
save image_back.png | |||
cmd.clip("near", near_dist) | |||
cmd.clip("far", far_dist) | |||
# render the foreground image | |||
as cartoon | |||
util.cbc | |||
unset opaque_background | |||
ray | |||
save image_front.png | |||
# now use Photoshop, Gimp, or ImageMagick to combine the images | |||
system composite image_front.png image_back.png image_merged.png | |||
system display image_merged.png | |||
</source> | |||
|seeAlso= | |||
*[[load]] | |||
*[[orient]] | |||
*[[set]] | |||
*[[unset]] | |||
*[[depth_cue]] | |||
*[[ray_shadows]] | |||
*[[ray_trace_mode]] | |||
*[[get_view]] | |||
*[[clip]] | |||
*[[as]] | |||
*[[surface]] | |||
*[[cartoon]] | |||
*[[ray_interior_color]] | |||
*[[color]] | |||
*[[ray]] | |||
*[[save]] | |||
*[[util.cbc]] | |||
*[[opaque_background]] | |||
*[[save]] | |||
*[[system]] | |||
}} | |||
{{GalleryImage | {{GalleryImage |
Revision as of 13:51, 25 August 2008
Cool PyMOL-generated Images and their Scripts. Add Your Own |
Grid Mode | What To Type | |||||
|
fetch 1cll 1sra 1ggz 5pnt 1rlw 1cdy;
set grid_mode
|
Cool Perspective | What To Type | |||||
|
load prot.pdb;
zoom i. 46-49 and n. CA
set field_of_view, 60
ray
|
Representing a binding pocket | What To Type | |||||
|
load $TUT/1hpv.pdb, tmp
extract lig, organic
extract prot, polymer
delete tmp
set surface_carve_cutoff, 4.5
set surface_carve_selection, lig
set surface_carve_normal_cutoff, -0.1
show surface, prot within 8 of lig
set two_sided_lighting
set transparency, 0.5
show sticks, lig
orient lig
set surface_color, white
set surface_type, 2 # mesh
unset ray_shadows
|
QuteMol Like | What To Type | |||||
|
load $TUT/1hpv.pdb
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_decay_range, 2
unset depth_cue
# for added coolness
# set field_of_view, 60
ray
|