Re: [PyMOL] PovRay
Hi Ian, As this may be of broader interest, I forward it to the pymol user list too. You can clip the scene using an intersection. Let's say that you have the object you want to clip stored as a povray include file object.inc. Then you can get the clipped object as: //### pymol_object = union { #include object.inc } clip = ...; // Here you need to fill in the 16th number from get_view(), giving the distance of the front clipping plane intersection { object { pymol_object } plane { z, -clip } } //### The plane could also be defined as plane{z,0 translate -clip} or, along the same lines, as plane{z,0 rotate 30*y translate-clip}. Like that you can have the clipping plane rotated. Do note that such intersections are often very slow. Especially with meshes (like surfaces) it is likely to be a pain (but potentially yielding great imagery :)). With many separate objects, spheres in particular, you can clip each of them separately, which is much faster, especially if you use the directives 'bounded_by' and 'clipped_by'. For a sphere defined as sphere{0,0,0, 1 pigment{color rgb 1}} this means that you convert it to intersection{ sphere{0,0,0, 1} object{IntersectionObject} pigment{color rgb 1} bounded_by { sphere{0,0,0, 1} } } I would suggest scripting this... :) Hope it helps, and good luck! Cheers, Tsjerk On Thu, Mar 24, 2011 at 8:31 PM, Ian Slaymaker iamslayma...@gmail.com wrote: Dear Tsjerk, I apologize for the elementary nature of my question, but I have spent quite some time wrestling with my rendering issues, and after solving most of them, a very small issue is blocking my progress. How do you get PovRay to read in the clipping plan of a pymol scene? I have tried a number of things, and nothing seems to work. Any help would be greatly appreciated. Thank you. Best, Ian -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] POVRAY Usage
Ah ha! Yes, of course Many thanks to you Rob for catching that! Note to self: *triple* shots of espresso next time :) -Tom -Original Message- From: Tsjerk Wassenaar [mailto:tsje...@gmail.com] Sent: Saturday, May 16, 2009 1:30 AM To: Thomas Stout Cc: pymol-users Subject: Re: [PyMOL] POVRAY Usage Hi Tom, Just as Robert says, the quote should be dropped. Maybe you should've had just one coffee more, but I should also have been more careful typing. Apparently I usually automatically start of with typing strings after .write( ;) Sorry about that. Tsjerk On Fri, May 15, 2009 at 11:57 PM, Thomas Stout tst...@exelixis.com wrote: Hi Tsjerk -- What version of PyMOL does this work with? I've been trying your commands with versions 1.1 and 1.2b and while PyMOL reports that the primitives have been processed, nothing is written to the file protein.pov other than the header info: camera {orthographic location 0.0 , 0.0 , 134.1048736572 look_at 0.0 , 0.0 , -1.0 right -74.9812240601*x up 59.9849815369*y} #default { finish{phong -1.000 ambient 0.500 diffuse 0.450 phong_size 13 .75}} light_source{4000.0001,4000.0001,9865.8951 rgb1.0,1.0,1.0} plane{z , -206.0869 pigment{color rgb1.,1.,1.} finish{phong 0 specular 0 diffuse 0 ambient 1.0}} #include povray.inc and povray.inc contains: cmd.get_povray()[1] If I save a povray file with the GUI menu selection: File Save Image As POV-Ray then I get everything written to disk. This occurs on both linux and Windows. Am I missing something that would be more obvious if I had had more coffee today? Thanks! -Tom PS - There was a missing quotation mark: open(povray.inc,w).write(cmd.get_povray()[1]) -- open(povray.inc,w).write(cmd.get_povray()[1]) -Original Message- From: Tsjerk Wassenaar [mailto:tsje...@gmail.com] Sent: Thu 5/14/2009 1:47 PM To: Sean Law Cc: pymol-users Subject: Re: [PyMOL] POVRAY Usage Hi Sean, Unfortunately, getting a good image through POV-Ray requires editing the POV-Ray file. You can write the scene to disk with the following commands pov=open(protein.pov,w) pov.write(cmd.get_povray()[0]) pov.write(#include \povray.inc\) pov.close() open(povray.inc,w).write(cmd.get_povray()[1]) Then, take your favorite editor (under windows, you can use the POV-Ray editor) and make some changes: 1. There's a line starting with #defaults. Remove that and replace it with: #default { finish { ambient .15 diffuse .5 specular 1 roughness .001 reflection { .5 metallic } // Remove this line for less glossyness and faster tracing } } 2. There's a light statement, which says: light_source{4000.0001,4000.0001,9960. rgb1.0,1.0,1.0}. Replace it with: light_source { 20,10,0 rgb 2 area_light 5,5,0,5,5 adaptive 1 jitter } This usually works for me :) Note that the trace may now take some time. Remove the metallic reflection for faster tracing. I hope it helps. POV-Ray is cool, but rather complicated. Cheers, Tsjerk On Thu, May 14, 2009 at 10:21 PM, Sean Law magic...@hotmail.com wrote: Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean Help keep personal info safe. Get Internet Explorer 8 today! - - The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http
Re: [PyMOL] POVRAY Usage
Hi Tom, Just as Robert says, the quote should be dropped. Maybe you should've had just one coffee more, but I should also have been more careful typing. Apparently I usually automatically start of with typing strings after .write( ;) Sorry about that. Tsjerk On Fri, May 15, 2009 at 11:57 PM, Thomas Stout tst...@exelixis.com wrote: Hi Tsjerk -- What version of PyMOL does this work with? I've been trying your commands with versions 1.1 and 1.2b and while PyMOL reports that the primitives have been processed, nothing is written to the file protein.pov other than the header info: camera {orthographic location 0.0 , 0.0 , 134.1048736572 look_at 0.0 , 0.0 , -1.0 right -74.9812240601*x up 59.9849815369*y} #default { finish{phong -1.000 ambient 0.500 diffuse 0.450 phong_size 13 .75}} light_source{4000.0001,4000.0001,9865.8951 rgb1.0,1.0,1.0} plane{z , -206.0869 pigment{color rgb1.,1.,1.} finish{phong 0 specular 0 diffuse 0 ambient 1.0}} #include povray.inc and povray.inc contains: cmd.get_povray()[1] If I save a povray file with the GUI menu selection: File Save Image As POV-Ray then I get everything written to disk. This occurs on both linux and Windows. Am I missing something that would be more obvious if I had had more coffee today? Thanks! -Tom PS - There was a missing quotation mark: open(povray.inc,w).write(cmd.get_povray()[1]) -- open(povray.inc,w).write(cmd.get_povray()[1]) -Original Message- From: Tsjerk Wassenaar [mailto:tsje...@gmail.com] Sent: Thu 5/14/2009 1:47 PM To: Sean Law Cc: pymol-users Subject: Re: [PyMOL] POVRAY Usage Hi Sean, Unfortunately, getting a good image through POV-Ray requires editing the POV-Ray file. You can write the scene to disk with the following commands pov=open(protein.pov,w) pov.write(cmd.get_povray()[0]) pov.write(#include \povray.inc\) pov.close() open(povray.inc,w).write(cmd.get_povray()[1]) Then, take your favorite editor (under windows, you can use the POV-Ray editor) and make some changes: 1. There's a line starting with #defaults. Remove that and replace it with: #default { finish { ambient .15 diffuse .5 specular 1 roughness .001 reflection { .5 metallic } // Remove this line for less glossyness and faster tracing } } 2. There's a light statement, which says: light_source{4000.0001,4000.0001,9960. rgb1.0,1.0,1.0}. Replace it with: light_source { 20,10,0 rgb 2 area_light 5,5,0,5,5 adaptive 1 jitter } This usually works for me :) Note that the trace may now take some time. Remove the metallic reflection for faster tracing. I hope it helps. POV-Ray is cool, but rather complicated. Cheers, Tsjerk On Thu, May 14, 2009 at 10:21 PM, Sean Law magic...@hotmail.com wrote: Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean Help keep personal info safe. Get Internet Explorer 8 today! -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30
Re: [PyMOL] POVRAY Usage
Hi Tsjerk -- What version of PyMOL does this work with? I've been trying your commands with versions 1.1 and 1.2b and while PyMOL reports that the primitives have been processed, nothing is written to the file protein.pov other than the header info: camera {orthographic location 0.0 , 0.0 , 134.1048736572 look_at 0.0 , 0.0 , -1.0 right -74.9812240601*x up 59.9849815369*y} #default { finish{phong -1.000 ambient0.500 diffuse0.450 phong_size 13 .75}} light_source{4000.0001,4000.0001,9865.8951 rgb1.0,1.0,1.0} plane{z , -206.0869 pigment{color rgb1.,1.,1.} finish{phong 0 specular 0 diffuse 0 ambient 1.0}} #include povray.inc and povray.inc contains: cmd.get_povray()[1] If I save a povray file with the GUI menu selection: File Save Image As POV-Ray then I get everything written to disk. This occurs on both linux and Windows. Am I missing something that would be more obvious if I had had more coffee today? Thanks! -Tom PS - There was a missing quotation mark: open(povray.inc,w).write(cmd.get_povray()[1]) -- open(povray.inc,w).write(cmd.get_povray()[1]) -Original Message- From: Tsjerk Wassenaar [mailto:tsje...@gmail.com] Sent: Thu 5/14/2009 1:47 PM To: Sean Law Cc: pymol-users Subject: Re: [PyMOL] POVRAY Usage Hi Sean, Unfortunately, getting a good image through POV-Ray requires editing the POV-Ray file. You can write the scene to disk with the following commands pov=open(protein.pov,w) pov.write(cmd.get_povray()[0]) pov.write(#include \povray.inc\) pov.close() open(povray.inc,w).write(cmd.get_povray()[1]) Then, take your favorite editor (under windows, you can use the POV-Ray editor) and make some changes: 1. There's a line starting with #defaults. Remove that and replace it with: #default { finish { ambient .15 diffuse .5 specular 1 roughness .001 reflection { .5 metallic } // Remove this line for less glossyness and faster tracing } } 2. There's a light statement, which says: light_source{4000.0001,4000.0001,9960. rgb1.0,1.0,1.0}. Replace it with: light_source { 20,10,0 rgb 2 area_light 5,5,0,5,5 adaptive 1 jitter } This usually works for me :) Note that the trace may now take some time. Remove the metallic reflection for faster tracing. I hope it helps. POV-Ray is cool, but rather complicated. Cheers, Tsjerk On Thu, May 14, 2009 at 10:21 PM, Sean Law magic...@hotmail.com wrote: Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean Help keep personal info safe. Get Internet Explorer 8 today! -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all
Re: [PyMOL] POVRAY Usage
Hi Tom On Fri, 15 May 2009 14:57:36 -0700, Thomas Stout tst...@exelixis.com wrote: What version of PyMOL does this work with? I've been trying your commands with versions 1.1 and 1.2b and while PyMOL reports that the primitives have been processed, nothing is written to the file protein.pov other than the header info: camera {orthographic location 0.0 , 0.0 , 134.1048736572 look_at 0.0 , 0.0 , -1.0 right -74.9812240601*x up 59.9849815369*y} #default { finish{phong -1.000 ambient0.500 diffuse0.450 phong_size 13 .75}} light_source{4000.0001,4000.0001,9865.8951 rgb1.0,1.0,1.0} plane{z , -206.0869 pigment{color rgb1.,1.,1.} finish{phong 0 specular 0 diffuse 0 ambient 1.0}} #include povray.inc and povray.inc contains: cmd.get_povray()[1] If I save a povray file with the GUI menu selection: File Save Image As POV-Ray then I get everything written to disk. This occurs on both linux and Windows. Am I missing something that would be more obvious if I had had more coffee today? Thanks! -Tom PS - There was a missing quotation mark: open(povray.inc,w).write(cmd.get_povray()[1]) -- open(povray.inc,w).write(cmd.get_povray()[1]) I think this is the real key! There was an extra quote. Try: open(povray.inc,w).write(cmd.get_povray()[1]) Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Botterell Hall Rm 644 Department of Biochemistry, Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821Fax: 613-533-2497 robert.campb...@queensu.cahttp://pldserver1.biochem.queensu.ca/~rlc -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] POVRAY Usage
Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean _ Find info faster and easier with Internet Explorer 8. http://go.microsoft.com/?linkid=9655583-- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] POVRAY Usage
Hi Sean, Unfortunately, getting a good image through POV-Ray requires editing the POV-Ray file. You can write the scene to disk with the following commands pov=open(protein.pov,w) pov.write(cmd.get_povray()[0]) pov.write(#include \povray.inc\) pov.close() open(povray.inc,w).write(cmd.get_povray()[1]) Then, take your favorite editor (under windows, you can use the POV-Ray editor) and make some changes: 1. There's a line starting with #defaults. Remove that and replace it with: #default { finish { ambient .15 diffuse .5 specular 1 roughness .001 reflection { .5 metallic } // Remove this line for less glossyness and faster tracing } } 2. There's a light statement, which says: light_source{4000.0001,4000.0001,9960. rgb1.0,1.0,1.0}. Replace it with: light_source { 20,10,0 rgb 2 area_light 5,5,0,5,5 adaptive 1 jitter } This usually works for me :) Note that the trace may now take some time. Remove the metallic reflection for faster tracing. I hope it helps. POV-Ray is cool, but rather complicated. Cheers, Tsjerk On Thu, May 14, 2009 at 10:21 PM, Sean Law magic...@hotmail.com wrote: Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean Help keep personal info safe. Get Internet Explorer 8 today! -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] POVRAY Usage
Hi Sean, Sorry about that. Tried from the top of my head and the evening had past too far for that already. These vectors define the directions to distribute the lights - you basically create an area of light sources. So you need to set two vectors: area_light 5,0,0,0,5,0,5,5 This will generate 25 lights in a five by five array perpendicular to the Pymol viewing axis (which is always along z). Cheers, Tsjerk On Thu, May 14, 2009 at 11:21 PM, Sean Law magic...@hotmail.com wrote: Tsjerk, Thanks for the quick response. I noticed that after area_light there should be two axis vectors (according to the povray website) but you've only specified one. Should I just repeat the same axis twice? Sean Date: Thu, 14 May 2009 22:47:54 +0200 Subject: Re: [PyMOL] POVRAY Usage From: tsje...@gmail.com To: magic...@hotmail.com CC: pymol-users@lists.sourceforge.net Hi Sean, Unfortunately, getting a good image through POV-Ray requires editing the POV-Ray file. You can write the scene to disk with the following commands pov=open(protein.pov,w) pov.write(cmd.get_povray()[0]) pov.write(#include \povray.inc\) pov.close() open(povray.inc,w).write(cmd.get_povray()[1]) Then, take your favorite editor (under windows, you can use the POV-Ray editor) and make some changes: 1. There's a line starting with #defaults. Remove that and replace it with: #default { finish { ambient .15 diffuse .5 specular 1 roughness .001 reflection { .5 metallic } // Remove this line for less glossyness and faster tracing } } 2. There's a light statement, which says: light_source{4000.0001,4000.0001,9960. rgb1.0,1.0,1.0}. Replace it with: light_source { 20,10,0 rgb 2 area_light 5,5,0,5,5 adaptive 1 jitter } This usually works for me :) Note that the trace may now take some time. Remove the metallic reflection for faster tracing. I hope it helps. POV-Ray is cool, but rather complicated. Cheers, Tsjerk On Thu, May 14, 2009 at 10:21 PM, Sean Law magic...@hotmail.com wrote: Hi All, While ray tracing a scene with 10 x-large proteins in grid mode at 3600, 3600 (width, height) I ran out of RAM (2 GB). I tried it again by writing everything into a script and using pymol -qc which still ran out of memory. I read somewhere that POVRAY is less of a memory hog so I installed the latest version and simply modified my script to ray 3600, 3600, renderer=1 to use POVRAY. Everything went smoothly but I noticed that the image generated from POVRAY looked different than the native ray traced structure using PyMOL's ray tracer (simply invoking ray without dimensions in PyMOL). Specifically, the light reflections appeared to be dulled in POVRAY and spheres that were further away from the camera view are not distinguishable. I've posted a comparison on the PyMOLWiki: http://www.pymolwiki.org/index.php/Povray_vs._pymol Firstly, I apologize as I am completely new to the world of POVRAY and I just assumed that the image produced from either method would give identical/close results but I much prefer the look of the PyMOL ray-tracer. Is there an easy way to set everything up the same way as the PyMOL ray-tracer but for POVRAY? Thank you for your time. Sean Help keep personal info safe. Get Internet Explorer 8 today! -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 Internet Explorer 8 makes surfing easier. Get it now! -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] povray image mapping and default pigments
This is for the povray gurus out there... Occasionally I muck around with the time-consuming practice of trying to map pictures onto molecular surfaces with povray. I had this working to some extent, but something has changed (I think with the povray file format produced by pymol make_pov where now there are fancy texture_list texture and pigment statements, rather than simple pigment ones.) In the past, I set it up so that the povray file has a header (cameras, lights, etc.) separate from the molecular scene description. Then I would usually edit the header to apply some #default texture or pigment to use the povray parlance. So the approach I used to use was to strip out all the pigment {} statements from the molecular scene descriptor povray input with a perl script, and then use the #default pigment {image_map{ mypicturehere.gif }} syntax in the header to map the image on to the surface...the practical uses of having a picture of someone, say, snowboarding down a mountain mapped onto the surface of some kinase are just endless. But that aside, the problem now is that these newer texture_list statements aren't so amenable to this global pigment removal thing, and I haven't quite figured out how best to get around this. (Couldn't remove them entirely and putting in the image_map pigment thing didn't seem to work, although maybe I just didn't get the right combination of open and closed brackets {?}}}) Anyone have any experiences along these lines? As near as I can tell, there was some switch in smooth triangle definitions with Povray 3.5 which was capitalized on by some pymol 0.98 edition. Perhaps I have to go back to an old archived version of pymol? Or, more sensibly, perhaps I should recognize that pictures of easter bunnies or whatever don't belong on some wood-textured rendition of a half-submerged albumin, glowing softly in the warm light(s) of a double sunset over an infinite lake lapping at the shores of a checkered beach. But for some reason journal editors seem to enjoy this. Thanks, Seth
[PyMOL] Povray macro
Hi Guys, For those interested, I've made a macro for Povray which allows to transform the Pymol povray output back to model space, or to transform povray models to Pymols camera space. After #including pymolmacro.inc call PYMOL_VIEW() with the eighteen floats from cmd.get_view() to set the transformations. Then Pymol models can be transformed by calling transform { FROM_PYMOL_VIEW } and povray models can be transformed with transform { TO_PYMOL_VIEW } An example of it, adding a povray density map to the pymol scene can be found at http://md.chem.rug.nl/~tsjerk/Gallery/density.jpg I hope to find some time to give more explanation on how I did that. Maybe something for a Wiki ;) Have fun, Tsjerk
[PyMOL] Povray macro (with attachment)
Okay, smart.., forgot the attachment and took a while to realize it :) On Thu, 17 Feb 2005 11:21:53 +0100 T.A.Wassenaar t.a.wassen...@rug.nl wrote: Hi Guys, For those interested, I've made a macro for Povray which allows to transform the Pymol povray output back to model space, or to transform povray models to Pymols camera space. After #including pymolmacro.inc call PYMOL_VIEW() with the eighteen floats from cmd.get_view() to set the transformations. Then Pymol models can be transformed by calling transform { FROM_PYMOL_VIEW } and povray models can be transformed with transform { TO_PYMOL_VIEW } An example of it, adding a povray density map to the pymol scene can be found at http://md.chem.rug.nl/~tsjerk/Gallery/density.jpg I hope to find some time to give more explanation on how I did that. Maybe something for a Wiki ;) Have fun, Tsjerk --- SF email is sponsored by - The IT Product Guide Read honest candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users // // PYMOLMACRO.INC v0.1 // // (c)2005 Tsjerk Wassenaar, University of Groningen // // This include file for Povray contains // just a few macros which together allow // the conversion between the model space // (cartesian coordinates) and the Pymol // camera space. // // With these macros one can easily combine // a Pymol scene with objects defined in the // coordinate space of the original // structure file. // // The input consists of the output of the // get_view() command in Pymol. This output // consists of 18 floating point numbers // defining a rotation matrix and shift // vectors for the origin of rotation and // for the camera position. // // The macro PYMOL_VIEW loads a // view obtained from Pymol. // // It #declares two transformation statements: // // FROM_PYMOL_VIEW // TO_PYMOL_VIEW // // The first can be used to transform the Pymol // scene back to model (normal) space, the latter // is used to transform other objects to appear in // the scene on the correct position. // // // // Tsjerk A. Wassenaar // February 16, 2005 // // Determinant of a matrix // #macro DET( m11, m12, m13, m21, m22, m23, m31, m32, m33 ) #local a = m11 * ( m22*m33 - m23*m32 ); #local b = m12 * ( m21*m33 - m23*m31 ); #local c = m13 * ( m21*m32 - m22*m31 ); (a - b + c) #end // of DET() // The inverse of a matrix // #macro INV( m11, m12, m13, m21, m22, m23, m31, m32, m33 ) #local invdet = 1/DET( m11, m12, m13, m21, m22, m23, m31, m32, m33 ); #local t11 = invdet * ( m22*m33 - m23*m32 ); #local t12 = invdet * ( m21*m33 - m23*m31 ); #local t13 = invdet * ( m21*m32 - m22*m31 ); #local t21 = invdet * ( m12*m33 - m13*m32 ); #local t22 = invdet * ( m11*m33 - m13*m31 ); #local t23 = invdet * ( m11*m32 - m12*m31 ); #local t31 = invdet * ( m12*m23 - m13*m22 ); #local t32 = invdet * ( m11*m23 - m13*m21 ); #local t33 = invdet * ( m11*m22 - m12*m21 ); t11, t12, t13, t21, t22, t23, t31, t32, t33, 0, 0, 0 #end // of INV() #macro PYMOL_VIEW(r11, r12, r13, // 3x3 Rotation matrix ( Model space to Camera space ) r21, r22, r23, r31, r32, r33, c1, c2, c3, // Camera position ( Model space ) o1, o2, o3, // Origin of rotation ( Model space ) s1, s2, or) // Slab near and far, orthoscopic flag ( discarded ) #declare TO_PYMOL_VIEW = transform { translate - o1, o2, o3 matrix r11, r12, r13, r21, r22, r23, r31, r32, r33, c1, c2, c3 } #declare FROM_PYMOL_VIEW = transform { translate - c1, c2, c3 matrix INV( r11, r12, r13, r21, r22, r23, r31, r32, r33 ) translate o1, o2, o3 } #end
Re: [PyMOL] Povray
* Tsjerk Wassenaar t.a.wassen...@chem.rug.nl [2004-02-19 04:30] wrote: Hi Guys, I seem to have some trouble rendering with povray. The render starts and finishes fine, and the image is created, but Pymol crashes with a segmentation fault as soon as the rendering is done. The image is not loaded to the viewer. I'm using povray 3.5 with Pymol 0.93 on a laptop (Intel Centrino) with SuSe 9.0. I have changed povray_exe in povray.py in modules to povray. I never use the povray rendering directly from within PyMOL. I find the PyMOL ray-tracer is great for most things and if it isn't sufficient, I want to be able to edit the povray input as you suggest below. Any hints? Yes! Than to Warren probably, it would be great if Pymol would be able to write a povray object (include file) from a given selection. That would combine the strong points of pymol where it comes to showing the thing as you want it, with those of Povray, where it comes to lighting, positioning, colouring, textures and so on. Since Pymol is already capable of producing povray input it wouldn't be very hard I would guess? It can do this. I use a simple little script that I call make_pov.py: ## # make_pov.py from pymol import cmd def make_pov(file): (header,data) = cmd.get_povray() povfile=open(file,'w') povfile.write(header) povfile.write(data) povfile.close() ## Load the file with 'run make_pov.py' and then within pymol do: make_pov('povray.input') Then outside PyMOL feed this file to povray with whatever command-line options you need. You do need to look at the size of the image reported by the make_pov. It looks something like: PyMOLmake_pov('povray.input') RayRenderPOV: w 1100 h 900 f 63.349 b 102.310 RayRenderPOV: vol -17.316 17.316 -14.168 RayRenderPOV: vol 14.168 63.349 102.310 RayRenderPovRay: processed 714 graphics primitives. Ray: total time: 0.03 sec. = 123885.9 frames/hour. (0.03 sec. accum.) You'll need to use the same width and height (or the same ratio) to make your povray output have the correct width to height ratio, e.g.: povray +Ipovray.input +W550 +H450 Cheers, Rob -- Robert L. Campbell, Ph.D. r...@post.queensu.ca Senior Research Associatephone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-533-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2
[PyMOL] POVRay output
Dear all, I am a new user of both pymol and this email list so I apologize when the items below already have been discussed earlier. I like the graphic output of the program very much! I am mainly interested in generating POV output files from Pymol instead of using the built-in renderer. Regarding this, I have two comments: 1) In a future version of Pymol, would it be possible to parametrize the POVray output such that all textures, finishes etc. are declared once as variables (e.g. something like #declare carbon_texture = texture) ? Now the textures are defined for every primitive (atoms, bonds, triangles) individually, making changing image appearance a heavy search and replace job. 2) when the Pymol built-in image rendering is used, the slab/clipping of the current view is used for the rendering. Instead, the POVray output includes the whole object regardless of the part that is clipped in the Pymol view. Are there any workarounds for this? Thanks for the help, Armand __ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com
Re: [PyMOL] POVRay output
* Armand Tepper wjwtep...@yahoo.com [2003-04-15 04:09] wrote: Dear all, 1) In a future version of Pymol, would it be possible to parametrize the POVray output such that all textures, finishes etc. are declared once as variables (e.g. something like #declare carbon_texture = texture) ? Now the textures are defined for every primitive (atoms, bonds, triangles) individually, making changing image appearance a heavy search and replace job. I'd like to second this. It would make editing easier, although I have found it possible to do with vim as long as I pick easily distinquishable colours for the different parts of the image. 2) when the Pymol built-in image rendering is used, the slab/clipping of the current view is used for the rendering. Instead, the POVray output includes the whole object regardless of the part that is clipped in the Pymol view. Are there any workarounds for this? I'm not sure that I agree with this, but then when I want to use POVray I'm not simply wanting to render what I can see in the PyMOL view, since I find the PyMOL rendering sufficient for most normal images. But this is simply my opinion. :) Cheers, Robert -- Robert L. Campbell, Ph.D. r...@post.queensu.ca Senior Research Associatephone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-633-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2
[PyMOL] PovRay file export
Hi, how to write the PovRay file out? (I do not want to embed PoyRay as the renderer.) Bye andreas -- +++ GMX - Mail, Messaging more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
Re: [PyMOL] PovRay file export
Hi, On 2003-02-26 14:54 Andreas wrote: how to write the PovRay file out? (I do not want to embed PoyRay as the renderer.) I also don't use povray directly as I like to edit the povray input file. I use the following script: # make_pov.py # do run make_pov.py within pymol, then make_pov('povray.inp') to # create a file called povray.inp (or substitute another name, of # course). from pymol import cmd def make_pov(file): (header,data) = cmd.get_povray() povfile=open(file,'w') povfile.write(header) povfile.write(data) povfile.close() Hope that helps, Robert -- Robert L. Campbell, Ph.D. r...@post.queensu.ca Senior Research Associatephone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-633-2497 Kingston, ON K7L 3N6 Canada PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2 (out of date web site:http://biophysics.med.jhmi.edu/rlc)