[Chimera-users] Batch mode for Chimera

James Starlight jmsstarlight at gmail.com
Thu Aug 31 01:00:23 PDT 2017

Thanks Eric!

Everything works fine with the exception of the copy command. On the
rendering stage I have:

Opened AT1_dry_apo.1rep.step7_1.pdb containing 1 model, 57791 atoms,
and 12661 residues
Traceback (most recent call last):
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimeraInit.py",
line 683, in init
    chimera.openModels.open(a, prefixableType=1)
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/__init__.py",
line 1951, in open
    models = func(filename, *args, **kw)
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/ChimeraExtension.py",
line 31, in func
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py",
line 108, in processCommandFile
    _processFile(f, emulateRead, filename)
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py",
line 143, in _processFile
    if makeCommand(line):
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py",
line 69, in makeCommand
    f(c, args)
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/midas_text.py",
line 1786, in doRangeColor
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Midas/__init__.py",
line 2526, in rangeColor
    from Ilabel.gui import IlabelDialog
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/Ilabel/gui.py",
line 13, in <module>
    from chimera import tkgui, chimage, CLOSE_SESSION
  File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/tkgui.py",
line 74, in <module>
    import Togl
ImportError: No module named Togl

Error while processing
ImportError: No module named Togl

  File "/home/gleb/.local/UCSF-Chimera64-batch/share/chimera/tkgui.py",
line 74, in <module>
    import Togl

See reply log for Python traceback.

I have found that it is due to some conflict in PYTHONPATH from my
bash since I am running Chimera directly from BASH. The people also
wrote that Its related to setting transparency-  which was not a case
there - I did not set in my script. Anyway how to fix it?

Thanks you!


2017-08-30 22:54 GMT+02:00 Eric Pettersen <pett at cgl.ucsf.edu>:
> Hi James,
> First, if you want to save images without showing the Chimera GUI then you
> have to use the “headless” version of Chimera, available on the download
> page.  To do the other things you want, just put the equivalent commands in
> a file that ends in “.cmd” and just add that file to your invocation of
> Chimera, e.g.:
> chimera $pdb script.cmd
> The easiest way to handle the image file name is probably to used a fixed
> name in the Chimera “copy” command, and then in your bash script move that
> file to the final name you want.  Also, "preset” is the command to apply
> presets — “help preset” in Chimera for more info.
> Hope this helps.
> —Eric
> Eric Pettersen
> UCSF Computer Graphics Lab
> On Aug 30, 2017, at 8:40 AM, James Starlight <jmsstarlight at gmail.com> wrote:
> Dear Chimera Users!
> My simple bash script loops the folder with the pdbs and open it in Chimera
> for pdb in ${output}/xtc_proc/*.pdb ; do
> name=$(basename "$pdb")
> echo "I am sending ${name} to Chimera!"
> chimera $pdb
> done
> My question - can I use with chimera some batch file which will
> apply the following commands to each of the loaded pdbs without
> opening of Chimera GUI:
> 1- Apply "publications-2" preset
> 2 - rangecolor bfactor key 2 blue 30 red 50 yellow # color pdb
> according to b-factor provided in the pdb file
> 3- make a screen-shot of the colored cartoon figure in the selected
> output folder.
> I thanks so much for the example of batch file and the syntax accepted
> by chimera from the linux shell.
> James
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription:
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list