[Chimera-users] Using ChimeraX in no-gui mode
Elaine Meng
meng at cgl.ucsf.edu
Mon Apr 15 14:29:03 PDT 2019
Hi James,
As mentioned in my previous message
<http://plato.cgl.ucsf.edu/pipermail/chimera-users/2019-April/015686.html>
...you have to use the “offscreen” option together with “nogui” (and linux) if you want to save images.
<http://rbvi.ucsf.edu/chimerax/docs/user/options.html>
Elaine
> On Apr 15, 2019, at 9:41 AM, James Starlight <jmsstarlight at gmail.com> wrote:
>
> Here is some update! :-)
>
> following tutorials found on the web, I have made a test.cxc file with
> all of the commands:
>
> # chimeraX script for B-factor coloring and saving of the image
> windowsize 800 600
> open ./test.pdb
> view; zoom 1.0; turn x 90; turn z -80;
>
> preset 'overall look' publication
> color byattribute bfactor palette rainbow range 2,100
>
> # make info
> 2dlab create title text "B-factors for" xpos .04 ypos .93 size 30
> # options for light
> light depthcuestart .4 depthcueend .8; lighting full
>
> save image ./test.png format png width 800 height 600 supersample 4
> transparentBackground false
> exit
>
> Briefly it looks fine being executing in GUI interphace hovewer in the
> precence of --nogui i got the following error during image rendering:
> chimerax-daily --nogui test.cxc
> Executing: save image ./test.png format png width 800 height 600
> supersample 4 transparentBackground false
> Traceback (most recent call last):
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/ChimeraX_main.py",
> line 699, in init
> commands.run(sess, 'open %s' % arg)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/run.py",
> line 31, in run
> results = command.run(text, log=log)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/cli.py",
> line 2616, in run
> result = ci.function(session, **kw_args)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/open.py",
> line 41, in open
> from_database=from_database, ignore_cache=ignore_cache, **kw))
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/open.py",
> line 117, in open
> models = handle_unknown_kw(session.models.open, paths,
> format=format, name=name, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/open.py",
> line 62, in handle_unknown_kw
> return f(*args, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/models.py",
> line 601, in open
> session, filenames, format=format, name=name, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/io.py",
> line 467, in open_multiple_data
> models, status = open_data(session, fspec, format=format, name=name, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/io.py",
> line 421, in open_data
> models, status = open_func(*args, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/scripting.py",
> line 115, in open_command_script
> run(session, text)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/run.py",
> line 31, in run
> results = command.run(text, log=log)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/cli.py",
> line 2616, in run
> result = ci.function(session, **kw_args)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/commands/save.py",
> line 61, in save
> fmt.export(session, filename, fmt.nicknames[0], **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/io.py",
> line 203, in export
> result = self.export_func(session, path, **kw)
> File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/image.py",
> line 43, in save_image
> raise LimitationError("Unable to render images to save them")
> chimerax.core.errors.LimitationError: Unable to render images to save them
>
> is it a bug?
More information about the Chimera-users
mailing list