Hi Tom,

As you have analyzed very correctly, volume is only available with on-screen 
rendering. I've added a section to the PyMOLWiki which describes the options 
and limitations:

https://pymolwiki.org/index.php/Volume#Ray_Tracing

Hope that helps.

Cheers,
  Thomas

On 23 Feb 2017, at 13:19, Thomas Grant <tomer...@gmail.com> wrote:

> Dear all,
> 
> I've written a .pml script to render volumes and save png files. The script 
> works fine when running it from the GUI, but for some reason when I run in 
> command line mode with pymol -cqr myscript.pml the image saved is blank.  
> 
> It appears that when running from the command line it automatically ray 
> traces the image, even when I set ray = 0 in the png command, and since 
> volumes don't work well with ray tracing, the images end up blank.
> 
> I tried setting ray_volume=1, but that still doesn't fix the problem.
> 
> My script is below, as is the output from the command line and from the GUI.  
> Notice that when running from the command line there is a "Ray: render time:" 
> line that doesn't appear when running from the GUI.
> 
> Thanks for any insight.
> 
> Tom
> 
> myscript.pml:
> $>cat myscript.pml:
> bg white
> fetch 1oky, type=2fofc, async=0
> volume 1okyVol, 1oky_2fofc
> set ray_volume, 1
> png volume.png, ray=0
> 
> command line output (doesn't work):
> $>pymol -cqr myscript.pml:
> PyMOL>bg white
> PyMOL>fetch 1oky, type=2fofc, async=0
>  ObjectMapLoadBRIXFile: Loading from './1oky_2fofc.omap'.
>  BRIXStrToMap: Map Size 102 x 99 x 92
>  BRIXStrToMap: Range = -0.906629 to 2.095844
>  BRIXStrToMap: Calculated Mean =   -0.006, Sigma =    0.251
>  BRIXStrToMap: Normalizing...
>  Crystal: Unit Cell          124.162  124.162   47.300
>  Crystal: Alpha Beta Gamma    90.000   90.000  120.000
>  Crystal: RealToFrac Matrix
>  Crystal:    0.0081    0.0046   -0.0000
>  Crystal:    0.0000    0.0093   -0.0000
>  Crystal:    0.0000    0.0000    0.0211
>  Crystal: FracToReal Matrix
>  Crystal:  124.1625  -62.0812    0.0000
>  Crystal:    0.0000  107.5279    0.0000
>  Crystal:    0.0000    0.0000   47.3000
>  Crystal: Unit Cell Volume   631499.
>  CmdLoad: "./1oky_2fofc.omap" loaded as "1oky_2fofc".
> PyMOL>volume 1okyVol, 1oky_2fofc
>  Executive: object "1okyVol" created.
>  Volume: created "1okyVol"
> PyMOL>set ray_volume, 1
>  Setting: ray_volume set to on.
> PyMOL>png volume.png, ray=0
>  Ray: render time: 0.01 sec. = 242165.4 frames/hour (0.01 sec. accum.).
>  ScenePNG: wrote 640x480 pixel image to file "volume.png".
> 
> GUI output (works):
> $>pymol -qr myscript.pml:
>  Detected OpenGL version 2.0 or greater. Shaders available.
>  Detected GLSL version 1.20.
> PyMOL>bg white
> PyMOL>fetch 1oky, type=2fofc, async=0
>  ObjectMapLoadBRIXFile: Loading from './1oky_2fofc.omap'.
>  BRIXStrToMap: Map Size 102 x 99 x 92
>  BRIXStrToMap: Range = -0.906629 to 2.095844
>  BRIXStrToMap: Calculated Mean =   -0.006, Sigma =    0.251
>  BRIXStrToMap: Normalizing...
>  Crystal: Unit Cell          124.162  124.162   47.300
>  Crystal: Alpha Beta Gamma    90.000   90.000  120.000
>  Crystal: RealToFrac Matrix
>  Crystal:    0.0081    0.0046   -0.0000
>  Crystal:    0.0000    0.0093   -0.0000
>  Crystal:    0.0000    0.0000    0.0211
>  Crystal: FracToReal Matrix
>  Crystal:  124.1625  -62.0812    0.0000
>  Crystal:    0.0000  107.5279    0.0000
>  Crystal:    0.0000    0.0000   47.3000
>  Crystal: Unit Cell Volume   631499.
>  CmdLoad: "./1oky_2fofc.omap" loaded as "1oky_2fofc".
> PyMOL>volume 1okyVol, 1oky_2fofc
>  Executive: object "1okyVol" created.
>  Volume: created "1okyVol"
> PyMOL>set ray_volume, 1
>  Setting: ray_volume set to on.
> PyMOL>png volume.png, ray=0
>  ScenePNG: wrote 640x480 pixel image to file "volume.png".
> 
> 
> 
> 
> --
> Thomas D. Grant, Ph.D.
> Staff Scientist
> BioXFEL Science and Technology Center
> Hauptman-Woodward Medical Research Institute
> 700 Ellicott St.
> Buffalo, NY 14203

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
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

Reply via email to