<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davidov</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Davidov"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Davidov"/>
	<updated>2026-04-30T10:42:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=258</id>
		<title>Talk:Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=258"/>
		<updated>2008-03-15T10:47:19Z</updated>

		<summary type="html">&lt;p&gt;Davidov: /* Performance images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Thums in gallery ==&lt;br /&gt;
&lt;br /&gt;
I've updated images (from performance part). But now the thumbs are not showing. What's wrong?&lt;br /&gt;
[[User:Davidov|Davidov]] 05:05, 13 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Performance images ==&lt;br /&gt;
&lt;br /&gt;
I loaded them with an image processing program.  The images are offset outside of the viewable area.  Please remake these images and try again.  If this keeps happening you may have found a bug. [[User:Inchoate|Tree]] 07:57, 13 March 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
:Thanks. It seems to be viewable area issue. [[User:Davidov|Davidov]] 05:47, 15 March 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1464</id>
		<title>File:Close ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1464"/>
		<updated>2008-03-15T10:44:40Z</updated>

		<summary type="html">&lt;p&gt;Davidov: uploaded a new version of &amp;quot;Image:Close ray.png&amp;quot;: Fix &amp;quot;image outside of viewable area&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2390</id>
		<title>File:Middle ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2390"/>
		<updated>2008-03-15T10:44:09Z</updated>

		<summary type="html">&lt;p&gt;Davidov: uploaded a new version of &amp;quot;Image:Middle ray.png&amp;quot;: Fix &amp;quot;image outside of viewable area&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera is not near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User_talk:Orpheus&amp;diff=10717</id>
		<title>User talk:Orpheus</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User_talk:Orpheus&amp;diff=10717"/>
		<updated>2008-03-13T12:05:25Z</updated>

		<summary type="html">&lt;p&gt;Davidov: Help  needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Help  needed ==&lt;br /&gt;
&lt;br /&gt;
I'm not sure that this is correct place to ask for help. But it seems that you are Sysop here (according to user list).&lt;br /&gt;
I have uploaded images but it seems that thumbnails are not generatet correctly: [[Ray#Performance]].  &lt;br /&gt;
&lt;br /&gt;
Any ideas? Thanks.&lt;br /&gt;
&lt;br /&gt;
[[User:Davidov|Davidov]] 07:05, 13 March 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=256</id>
		<title>Talk:Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=256"/>
		<updated>2008-03-13T10:05:16Z</updated>

		<summary type="html">&lt;p&gt;Davidov: /* Thums in gallery */ signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Thums in gallery ==&lt;br /&gt;
&lt;br /&gt;
I've updated images (from performance part). But now the thumbs are not showing. What's wrong?&lt;br /&gt;
[[User:Davidov|Davidov]] 05:05, 13 March 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=255</id>
		<title>Talk:Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=255"/>
		<updated>2008-03-13T10:05:02Z</updated>

		<summary type="html">&lt;p&gt;Davidov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Thums in gallery ==&lt;br /&gt;
&lt;br /&gt;
I've updated images (from performance part). But now the thumbs are not showing. What's wrong?&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=254</id>
		<title>Talk:Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Ray&amp;diff=254"/>
		<updated>2008-03-13T10:04:44Z</updated>

		<summary type="html">&lt;p&gt;Davidov: Thums in &amp;lt;gallery&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Thums in &amp;lt;gallery&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
I've updated images (from performance part). But now the thumbs are not showing. What's wrong?&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ray&amp;diff=9954</id>
		<title>Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ray&amp;diff=9954"/>
		<updated>2008-03-13T09:48:23Z</updated>

		<summary type="html">&lt;p&gt;Davidov: /* Performance */ trying to force thumbs update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==DESCRIPTION==&lt;br /&gt;
'''ray''' creates a ray-traced image of the current frame. This command is used to make high-resolution photos fit for publication and formal movies.  Please note, the '''ray''' command can take some time (up to several minutes, depending on image complexity and size).&lt;br /&gt;
&lt;br /&gt;
For those who are making movies with PyMOL, '''Ray''' is one of the most commonly used last steps before stitching the frames together to compile the movie.  '''Ray''' has many powerful features such as setting the size of the image -- and it still works even if the [[Viewport]] or screen is smaller than the requested output file dimensions.&lt;br /&gt;
&lt;br /&gt;
==USAGE==&lt;br /&gt;
 ray [width,height [,renderer [,angle [,shift ]]]&lt;br /&gt;
'''angle''' and '''shift''' can be used to generate matched stereo pairs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PYMOL API==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;cmd.ray(int width,int height,int renderer=-1,float shift=0)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SETTINGS==&lt;br /&gt;
===Modes===&lt;br /&gt;
Setting the '''[[Ray_trace_mode]]''' variable in PyMOL changes the way PyMOL's internal renderer represents proteins in the final output.  New modes were recently added to give the user more options of molecular representation.  New modes are: normal rendering, but with a black outline (nice for presentations); black and white only; quantized color with black outline (also, very nice for presentations; more of a ''cartoony'' appearance).  &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Mode 3, the quantized color one, sort of '''burns''' the background if you're using this setting.  This will make a pure white background somewhat &amp;quot;offwhite&amp;quot;; thus, a poster would look poor because you could see the border for the image.  If you'll be using this mode, try the [[ray_opaque_background]] setting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# normal color&lt;br /&gt;
set ray_trace_mode, 0&lt;br /&gt;
&lt;br /&gt;
# normal color + black outline&lt;br /&gt;
set ray_trace_mode,  1&lt;br /&gt;
&lt;br /&gt;
# black outline only&lt;br /&gt;
set ray_trace_mode,  2&lt;br /&gt;
&lt;br /&gt;
# quantized color + black outline&lt;br /&gt;
set ray_trace_mode,  3&lt;br /&gt;
&lt;br /&gt;
set ray_trace_mode, 1 # (or 2 or 3; best with &amp;quot;bg_color white;set antialias,2&amp;quot;)&lt;br /&gt;
# These two new modes -- 2 and 3 -- are cool cartoon looking modes.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the example images for the new modes&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Ray_mode_1_ex.png|set ray_trace_mode,1&lt;br /&gt;
Image:Ray_mode_2_ex.png|set ray_trace_mode,2&lt;br /&gt;
Image:Ray_mode_3_ex.png|set ray_trace_mode,3&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Perspective===&lt;br /&gt;
====Perspective Example Images====&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:No_persp.png|Example with Perspective Turned Off&lt;br /&gt;
Image:Persp1.png|Example with Perspective Turned On&lt;br /&gt;
Image:Persp2.png|Example with Perspective Turned On and Field of View Set High (70).&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Notes=====&lt;br /&gt;
PyMol 0.97 and prior used '''orthoscopic''' rendering -- that is, no perspective.  Upon the arrival of 0.98 and later, we get perspective based rendering at a cost of a 4x decrease in render speed.  If you want perspective&lt;br /&gt;
 set orthoscopic, off&lt;br /&gt;
Otherwise&lt;br /&gt;
 set orthoscopic, on&lt;br /&gt;
To magnify the effect of perspective on the scene,&lt;br /&gt;
 set field_of_view, X&lt;br /&gt;
where 50&amp;lt;X&amp;lt;70.  Default is 20.  50-70 gives a very strong perspective effect.  Nb. the field of view is in Y, not X as one would expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Renderer===&lt;br /&gt;
'''renderer = -1''' is default (use value in ray_default_renderer)&lt;br /&gt;
&lt;br /&gt;
'''renderer =  0''' uses PyMOL's internal renderer&lt;br /&gt;
&lt;br /&gt;
'''renderer =  1''' uses PovRay's renderer.  This is Unix-only and you must have &amp;quot;x-povray&amp;quot; in your path.  It utilizes two temporary files: &amp;quot;tmp_pymol.pov&amp;quot; and &amp;quot;tmp_pymol.png&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Performance==&lt;br /&gt;
The ray performance depends on distance between camera and molecule.&lt;br /&gt;
If the distance is big rendering takes much time. If the distance is too small distant parts of molecule dissolve.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Close_ray.png|Too close to molecule&lt;br /&gt;
Image:Middle_ray.png|Normal distance&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene using the default size of the viewport&lt;br /&gt;
ray&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Image Size===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene, but scaled to 1024x768 pixels&lt;br /&gt;
ray 1024,768&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Renderer===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace with an external renderer.&lt;br /&gt;
ray renderer=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality B&amp;amp;W Rendering===&lt;br /&gt;
[[Image:1l9l.png|thumb|center|Black and White (ray_trace_mode,2); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Black and White Script&lt;br /&gt;
load /tmp/3fib.pdb;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 2;  # black and white cartoon&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality Color===&lt;br /&gt;
[[Image:1l9l_2.png|thumb|center|Color mode (ray_trace_mode,3); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Color Script&lt;br /&gt;
load /tmp/thy_model/1l9l.pdb;&lt;br /&gt;
hide lines;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 3; # color&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
remove resn HOH&lt;br /&gt;
remove resn HET&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ray Tracing Stereo Images===&lt;br /&gt;
See [[Stereo_Ray]].&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
&amp;quot;help faster&amp;quot; for optimization tips with the builtin renderer. &amp;quot;help povray&amp;quot; for how to use PovRay instead of PyMOL's built-in    ray-tracing engine.  For high-quality photos, please also see the [[Antialias]] command.  [[Ray shadows]] for controlling shadows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Ray Tracing]].&lt;br /&gt;
&lt;br /&gt;
==USER Comments==&lt;br /&gt;
====How do I ray trace a publication-ready (~300dpi) image using PyMol?====&lt;br /&gt;
This answer is in the [[:Category:Advanced_Issues|Advanced Issues]] (Image Manipulation Section).&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|ray]]&lt;br /&gt;
[[Category:Publication_Quality|ray]]&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ray&amp;diff=9953</id>
		<title>Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ray&amp;diff=9953"/>
		<updated>2008-03-13T09:47:10Z</updated>

		<summary type="html">&lt;p&gt;Davidov: /* Performance */  trying to force thumbs update 1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==DESCRIPTION==&lt;br /&gt;
'''ray''' creates a ray-traced image of the current frame. This command is used to make high-resolution photos fit for publication and formal movies.  Please note, the '''ray''' command can take some time (up to several minutes, depending on image complexity and size).&lt;br /&gt;
&lt;br /&gt;
For those who are making movies with PyMOL, '''Ray''' is one of the most commonly used last steps before stitching the frames together to compile the movie.  '''Ray''' has many powerful features such as setting the size of the image -- and it still works even if the [[Viewport]] or screen is smaller than the requested output file dimensions.&lt;br /&gt;
&lt;br /&gt;
==USAGE==&lt;br /&gt;
 ray [width,height [,renderer [,angle [,shift ]]]&lt;br /&gt;
'''angle''' and '''shift''' can be used to generate matched stereo pairs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PYMOL API==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;cmd.ray(int width,int height,int renderer=-1,float shift=0)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SETTINGS==&lt;br /&gt;
===Modes===&lt;br /&gt;
Setting the '''[[Ray_trace_mode]]''' variable in PyMOL changes the way PyMOL's internal renderer represents proteins in the final output.  New modes were recently added to give the user more options of molecular representation.  New modes are: normal rendering, but with a black outline (nice for presentations); black and white only; quantized color with black outline (also, very nice for presentations; more of a ''cartoony'' appearance).  &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Mode 3, the quantized color one, sort of '''burns''' the background if you're using this setting.  This will make a pure white background somewhat &amp;quot;offwhite&amp;quot;; thus, a poster would look poor because you could see the border for the image.  If you'll be using this mode, try the [[ray_opaque_background]] setting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# normal color&lt;br /&gt;
set ray_trace_mode, 0&lt;br /&gt;
&lt;br /&gt;
# normal color + black outline&lt;br /&gt;
set ray_trace_mode,  1&lt;br /&gt;
&lt;br /&gt;
# black outline only&lt;br /&gt;
set ray_trace_mode,  2&lt;br /&gt;
&lt;br /&gt;
# quantized color + black outline&lt;br /&gt;
set ray_trace_mode,  3&lt;br /&gt;
&lt;br /&gt;
set ray_trace_mode, 1 # (or 2 or 3; best with &amp;quot;bg_color white;set antialias,2&amp;quot;)&lt;br /&gt;
# These two new modes -- 2 and 3 -- are cool cartoon looking modes.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the example images for the new modes&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Ray_mode_1_ex.png|set ray_trace_mode,1&lt;br /&gt;
Image:Ray_mode_2_ex.png|set ray_trace_mode,2&lt;br /&gt;
Image:Ray_mode_3_ex.png|set ray_trace_mode,3&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Perspective===&lt;br /&gt;
====Perspective Example Images====&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:No_persp.png|Example with Perspective Turned Off&lt;br /&gt;
Image:Persp1.png|Example with Perspective Turned On&lt;br /&gt;
Image:Persp2.png|Example with Perspective Turned On and Field of View Set High (70).&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Notes=====&lt;br /&gt;
PyMol 0.97 and prior used '''orthoscopic''' rendering -- that is, no perspective.  Upon the arrival of 0.98 and later, we get perspective based rendering at a cost of a 4x decrease in render speed.  If you want perspective&lt;br /&gt;
 set orthoscopic, off&lt;br /&gt;
Otherwise&lt;br /&gt;
 set orthoscopic, on&lt;br /&gt;
To magnify the effect of perspective on the scene,&lt;br /&gt;
 set field_of_view, X&lt;br /&gt;
where 50&amp;lt;X&amp;lt;70.  Default is 20.  50-70 gives a very strong perspective effect.  Nb. the field of view is in Y, not X as one would expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Renderer===&lt;br /&gt;
'''renderer = -1''' is default (use value in ray_default_renderer)&lt;br /&gt;
&lt;br /&gt;
'''renderer =  0''' uses PyMOL's internal renderer&lt;br /&gt;
&lt;br /&gt;
'''renderer =  1''' uses PovRay's renderer.  This is Unix-only and you must have &amp;quot;x-povray&amp;quot; in your path.  It utilizes two temporary files: &amp;quot;tmp_pymol.pov&amp;quot; and &amp;quot;tmp_pymol.png&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Performance==&lt;br /&gt;
The ray performance depends on distance between camera and molecule.&lt;br /&gt;
If the distance is big rendering takes much time. If the distance is too small distant parts of molecule dissolve.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene using the default size of the viewport&lt;br /&gt;
ray&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Image Size===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene, but scaled to 1024x768 pixels&lt;br /&gt;
ray 1024,768&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Renderer===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace with an external renderer.&lt;br /&gt;
ray renderer=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality B&amp;amp;W Rendering===&lt;br /&gt;
[[Image:1l9l.png|thumb|center|Black and White (ray_trace_mode,2); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Black and White Script&lt;br /&gt;
load /tmp/3fib.pdb;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 2;  # black and white cartoon&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality Color===&lt;br /&gt;
[[Image:1l9l_2.png|thumb|center|Color mode (ray_trace_mode,3); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Color Script&lt;br /&gt;
load /tmp/thy_model/1l9l.pdb;&lt;br /&gt;
hide lines;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 3; # color&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
remove resn HOH&lt;br /&gt;
remove resn HET&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ray Tracing Stereo Images===&lt;br /&gt;
See [[Stereo_Ray]].&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
&amp;quot;help faster&amp;quot; for optimization tips with the builtin renderer. &amp;quot;help povray&amp;quot; for how to use PovRay instead of PyMOL's built-in    ray-tracing engine.  For high-quality photos, please also see the [[Antialias]] command.  [[Ray shadows]] for controlling shadows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Ray Tracing]].&lt;br /&gt;
&lt;br /&gt;
==USER Comments==&lt;br /&gt;
====How do I ray trace a publication-ready (~300dpi) image using PyMol?====&lt;br /&gt;
This answer is in the [[:Category:Advanced_Issues|Advanced Issues]] (Image Manipulation Section).&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|ray]]&lt;br /&gt;
[[Category:Publication_Quality|ray]]&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2389</id>
		<title>File:Middle ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2389"/>
		<updated>2008-03-13T09:38:10Z</updated>

		<summary type="html">&lt;p&gt;Davidov: uploaded a new version of &amp;quot;Image:Middle ray.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera is not near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1463</id>
		<title>File:Close ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1463"/>
		<updated>2008-03-13T09:37:42Z</updated>

		<summary type="html">&lt;p&gt;Davidov: uploaded a new version of &amp;quot;Image:Close ray.png&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ray&amp;diff=9952</id>
		<title>Ray</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ray&amp;diff=9952"/>
		<updated>2008-03-13T09:31:38Z</updated>

		<summary type="html">&lt;p&gt;Davidov: notes about performance and distance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==DESCRIPTION==&lt;br /&gt;
'''ray''' creates a ray-traced image of the current frame. This command is used to make high-resolution photos fit for publication and formal movies.  Please note, the '''ray''' command can take some time (up to several minutes, depending on image complexity and size).&lt;br /&gt;
&lt;br /&gt;
For those who are making movies with PyMOL, '''Ray''' is one of the most commonly used last steps before stitching the frames together to compile the movie.  '''Ray''' has many powerful features such as setting the size of the image -- and it still works even if the [[Viewport]] or screen is smaller than the requested output file dimensions.&lt;br /&gt;
&lt;br /&gt;
==USAGE==&lt;br /&gt;
 ray [width,height [,renderer [,angle [,shift ]]]&lt;br /&gt;
'''angle''' and '''shift''' can be used to generate matched stereo pairs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PYMOL API==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;cmd.ray(int width,int height,int renderer=-1,float shift=0)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SETTINGS==&lt;br /&gt;
===Modes===&lt;br /&gt;
Setting the '''[[Ray_trace_mode]]''' variable in PyMOL changes the way PyMOL's internal renderer represents proteins in the final output.  New modes were recently added to give the user more options of molecular representation.  New modes are: normal rendering, but with a black outline (nice for presentations); black and white only; quantized color with black outline (also, very nice for presentations; more of a ''cartoony'' appearance).  &lt;br /&gt;
&lt;br /&gt;
'''Note:''' Mode 3, the quantized color one, sort of '''burns''' the background if you're using this setting.  This will make a pure white background somewhat &amp;quot;offwhite&amp;quot;; thus, a poster would look poor because you could see the border for the image.  If you'll be using this mode, try the [[ray_opaque_background]] setting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# normal color&lt;br /&gt;
set ray_trace_mode, 0&lt;br /&gt;
&lt;br /&gt;
# normal color + black outline&lt;br /&gt;
set ray_trace_mode,  1&lt;br /&gt;
&lt;br /&gt;
# black outline only&lt;br /&gt;
set ray_trace_mode,  2&lt;br /&gt;
&lt;br /&gt;
# quantized color + black outline&lt;br /&gt;
set ray_trace_mode,  3&lt;br /&gt;
&lt;br /&gt;
set ray_trace_mode, 1 # (or 2 or 3; best with &amp;quot;bg_color white;set antialias,2&amp;quot;)&lt;br /&gt;
# These two new modes -- 2 and 3 -- are cool cartoon looking modes.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the example images for the new modes&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Ray_mode_1_ex.png|set ray_trace_mode,1&lt;br /&gt;
Image:Ray_mode_2_ex.png|set ray_trace_mode,2&lt;br /&gt;
Image:Ray_mode_3_ex.png|set ray_trace_mode,3&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Perspective===&lt;br /&gt;
====Perspective Example Images====&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:No_persp.png|Example with Perspective Turned Off&lt;br /&gt;
Image:Persp1.png|Example with Perspective Turned On&lt;br /&gt;
Image:Persp2.png|Example with Perspective Turned On and Field of View Set High (70).&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Notes=====&lt;br /&gt;
PyMol 0.97 and prior used '''orthoscopic''' rendering -- that is, no perspective.  Upon the arrival of 0.98 and later, we get perspective based rendering at a cost of a 4x decrease in render speed.  If you want perspective&lt;br /&gt;
 set orthoscopic, off&lt;br /&gt;
Otherwise&lt;br /&gt;
 set orthoscopic, on&lt;br /&gt;
To magnify the effect of perspective on the scene,&lt;br /&gt;
 set field_of_view, X&lt;br /&gt;
where 50&amp;lt;X&amp;lt;70.  Default is 20.  50-70 gives a very strong perspective effect.  Nb. the field of view is in Y, not X as one would expect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Renderer===&lt;br /&gt;
'''renderer = -1''' is default (use value in ray_default_renderer)&lt;br /&gt;
&lt;br /&gt;
'''renderer =  0''' uses PyMOL's internal renderer&lt;br /&gt;
&lt;br /&gt;
'''renderer =  1''' uses PovRay's renderer.  This is Unix-only and you must have &amp;quot;x-povray&amp;quot; in your path.  It utilizes two temporary files: &amp;quot;tmp_pymol.pov&amp;quot; and &amp;quot;tmp_pymol.png&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Performance==&lt;br /&gt;
The ray performance depends on distance between camera and molecule.&lt;br /&gt;
If the distance is big rendering takes much time. If the distance is too small distant parts of molecule dissolve.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Close_ray.png|Too close to molecule&lt;br /&gt;
Image:Middle_ray.png|Normal distance&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Simple===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene using the default size of the viewport&lt;br /&gt;
ray&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Image Size===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace the current scene, but scaled to 1024x768 pixels&lt;br /&gt;
ray 1024,768&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Specify Renderer===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# ray trace with an external renderer.&lt;br /&gt;
ray renderer=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality B&amp;amp;W Rendering===&lt;br /&gt;
[[Image:1l9l.png|thumb|center|Black and White (ray_trace_mode,2); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Black and White Script&lt;br /&gt;
load /tmp/3fib.pdb;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 2;  # black and white cartoon&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===High Quality Color===&lt;br /&gt;
[[Image:1l9l_2.png|thumb|center|Color mode (ray_trace_mode,3); click to see full image]]&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Color Script&lt;br /&gt;
load /tmp/thy_model/1l9l.pdb;&lt;br /&gt;
hide lines;&lt;br /&gt;
show cartoon;&lt;br /&gt;
set ray_trace_mode, 3; # color&lt;br /&gt;
bg_color white;&lt;br /&gt;
set antialias, 2;&lt;br /&gt;
remove resn HOH&lt;br /&gt;
remove resn HET&lt;br /&gt;
ray 600,600&lt;br /&gt;
png /tmp/1l9l.png&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ray Tracing Stereo Images===&lt;br /&gt;
See [[Stereo_Ray]].&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
&amp;quot;help faster&amp;quot; for optimization tips with the builtin renderer. &amp;quot;help povray&amp;quot; for how to use PovRay instead of PyMOL's built-in    ray-tracing engine.  For high-quality photos, please also see the [[Antialias]] command.  [[Ray shadows]] for controlling shadows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Ray Tracing]].&lt;br /&gt;
&lt;br /&gt;
==USER Comments==&lt;br /&gt;
====How do I ray trace a publication-ready (~300dpi) image using PyMol?====&lt;br /&gt;
This answer is in the [[:Category:Advanced_Issues|Advanced Issues]] (Image Manipulation Section).&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|ray]]&lt;br /&gt;
[[Category:Publication_Quality|ray]]&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2388</id>
		<title>File:Middle ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Middle_ray.png&amp;diff=2388"/>
		<updated>2008-03-13T09:26:41Z</updated>

		<summary type="html">&lt;p&gt;Davidov: Ray when camera is not near to molecule.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera is not near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1462</id>
		<title>File:Close ray.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=File:Close_ray.png&amp;diff=1462"/>
		<updated>2008-03-13T09:26:10Z</updated>

		<summary type="html">&lt;p&gt;Davidov: Ray when camera near to molecule.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ray when camera near to molecule.&lt;/div&gt;</summary>
		<author><name>Davidov</name></author>
	</entry>
</feed>