[Chimera-users] Using headless chimera to create images

Greg Couch gregc at cgl.ucsf.edu
Mon Nov 19 10:58:36 PST 2018

So, if you have a graphics card, the full version of chimera will be 
*much* faster for 3D graphics. So depending on your definition of 
efficient, the full version is way more efficient.  The offscreen 
rendering is done with a software implementation of OpenGL using 
OSMesa.  And the bundled version of OSMesa is ancient, so it is 
believable that some of Chimera's graphics are not rendered properly.

Possible solutions: (A) use the full version of Chimera, (B) install the 
system version of OSMesa and remove CHIMERA/lib/libOSMesa.so*, so 
Chimera picks up the system version (but currently the 
Ubuntu/CentOS/RHEL versions only support OpenGL 2.1), (C) compile OSMesa 
from the Mesa source, www.mesa3d.org, needs the --enable-gallium-llvm 
option for OpenGL 3.3 support, (D) wait a week and use ChimeraX (I'm 
debugging the offscreen support, and it bundles a version of OSMesa that 
should work for Chimera too), or (E) extract the libOSMesa.so from 
ChimeraX and put it in CHIMERA/lib.

I'd skip solution (C).  (D) is recommended if ChimeraX has enough 
support for what you need to do -- it is more short term work for better 
results.  (B) is easy if it works.  (E) is more likely to work than 
(B).  (A) is best for just getting things done quickly.



On 11/16/2018 8:33 PM, Chemmama, Ilan wrote:
> Dear developers,
> I am trying to create a bunch of images using Chimera.
> I wrote a script that create the scene using the following steps:
> *mc_frame=str(INPUT_FRAME_NUMBER)*
> *rmffile=str("PATH_TO_RMF")*
> *
> *
> *runCommand('open '+rmffile)*
> *
> *
> *runCommand('set bgcolor white')*
> *runCommand('windowsize 1028 1028')*
> *runCommand('~set depthCue')*
> *runCommand('set projection orthographic')*
> *
> *
> runCommand('wait 2')
> runCommand('scale 0.75')
> runCommand('copy file ./Image_'+mc_frame+'.png PNG supersample 3 dpi 300')
> runCommand('close all')
> runCommand('stop now’)
> While the scrips works in the headless version using PDB files, I have 
> not been successful when using RMF files.
> The images when using the RMF files are just the background color (red 
> when set to red, blue when set to blue) without the structure.
> I tried also to add the display .2 option as in:
> *runCommand(‘display #0.2’) *
> which corresponds to the RMF beads scene in the model panel.
> I should add that using the GUI version of chimera, the script works 
> fine and all the images are properly created.
> Do you have any hints/clues on what could be done to make it work?
> (I am running the script the full version of chimera but the headless 
> should be more efficient).
> Thanks,
> Ilan
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20181119/0c4ebf6e/attachment.html>

More information about the Chimera-users mailing list