
On May 26, 2005, at 8:17 AM, Miguel Ortiz Lombardia wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello.
I'm trying to execute this:
$chimera --nogui cmd:findselhbonds
where the file findselhbonds contains:
open 01.pdb select :59-62 hbonds selRestrict any saveFile tmp.bonds
In the graphic mode those instructions work as expected, however in the - --nogui mode I get this error:
<snip>
NameError: global name 'selMode' is not defined (see reply log for Python traceback info) Traceback (most recent call last): File "/usr/local/linux_prg/Chimera/share/__main__.py", line 59, in ? value = chimeraInit.init(sys.argv) File "CHIMERA/share/chimeraInit.py", line 287, in init prefixableType=1) File "CHIMERA/share/chimera/__init__.py", line 1043, in open File "CHIMERA/share/Midas/ChimeraExtension.py", line 17, in func File "CHIMERA/share/Midas/midas_text.py", line 88, in processCommandFile File "CHIMERA/share/Midas/midas_text.py", line 62, in makeCommand File "CHIMERA/share/Midas/midas_text.py", line 1039, in doSelect File "CHIMERA/share/Midas/__init__.py", line 620, in chimeraSelect File "CHIMERA/share/chimera/tkgui.py", line 1604, in selectionOperation NameError: global name 'selMode' is not defined
Any clues? Thank you very much!
Ah, we'll get this fixed for the next release. In the interim, here's what you can do: edit CHIMERA/share/Midas/__init__.py. Lines 619 and 620 will be: from chimera import tkgui tkgui.selectionOperation(sel) Change those to: from chimera.selection import setCurrent setCurrent(sel) Retain the same indentation that the original lines had -- indentation is important to Python! Eric Pettersen UCSF Computer Graphics Lab pett@cgl.ucsf.edu http://www.cgl.ucsf.edu