[Chimera-users] Using ChimeraX in no-gui mode

James Starlight jmsstarlight at gmail.com
Mon Apr 15 09:41:46 PDT 2019


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?






пн, 15 апр. 2019 г. в 11:14, James Starlight <jmsstarlight at gmail.com>:
>
> Dear Chimera users!
>
> Would be possible to use new ChimeraX for execution of some simple
> scripts for structure visualisation and imaging via no-gui mode?
>
> I am using bash script to loop over pdbs and would like to
>
> 1) open each pdb which contains b-factors info in chimeraX
> 2) apply preset publication
> 3) colour the pdb using "color byattribute bfactor palette rainbow ave residue"
> 4) save high quality image at the selected directory using chimera render
>
> Would it be possible to do these things directly from linux terminal
> providing each time pdb and some script file with the list of the
> applied commands?
>
> chimerax-daily ${pdb} ${script}
>
> Thank you in advance!




More information about the Chimera-users mailing list