[Chimera-users] Scripting to write / save multiple models into single pdf file
Eric Pettersen
pett at cgl.ucsf.edu
Thu Mar 11 14:23:31 PST 2010
Hi Sumitro,
Don't include "open" on the Unix command line. You only need that
when typing into Chimera's own command line.
--Eric
On Mar 10, 2010, at 10:28 AM, Sumitro Harjanto wrote:
> That was a bull’s eye, indeed, after turning off the autostart for
> Model panel, the simple command of “>chimera --nogui” does not make
> anymore complain.
>
> So I advanced a little and try to run a .cmd file using the command
> prompt:
> >chimera --nogui open e:\A.Model_receptor\model_env
> \calc_receptor_rmsds.cmd
>
> But again I got the same error message:
> ***********************************************************************
> Chimera failed abnormally; the exit code was: 1
> Use –debug command line option for the full error message.
> ************************************************************************
>
> Below is what I see after adding "--debug" to the command:
> ***********************************************************************
> Cannot execute 'gzip': no automatic decompression of .Z files
> Traceback (most recent call last):
> File "E:\Chimera\share\chimeraInit.py", line 425, in init
> Chimera.openModels.open<a, prefixableType=1>
> File "E:\Chimera\share\chimera\__init__.py", line 1405, in open
> Raise ValueError, "Unknown model type"
> ValueError: Unknown model type
> Error while processing open:
> ValueError: Unknown model type
>
> File "E:\Chimera\share\chimera\__init__.py", line 1405, in open
> Raise ValueError, "Unknown model type"
>
> See reply log for Phyton traceback.
>
> Opening 2HN7.pdb…
> 1 model opened
> Opened … … … (and actually continues to complete my script)
> ***********************************************************************
> Later on I tried to open a pdb instead (>chimera --nogui open e:
> \A.Model_receptor\PDB_MODELS\3B3I.pdb) and the same thing happened,
> even the debug window shows the same message about unknown model type.
>
> Any way to go around this..? I don’t know if it helps, but below is
> my “preferences” file
> *********************************************************************
> {'Model Panel': {'freqButs': {'2D Diagram': False,
> 'activate': False,
> 'activate all': True,
> 'activate only': True,
> 'add hydrogens...': False,
> 'add/edit note...': True,
> 'attributes...': True,
> 'blast protein...': True,
> 'clipping...': True,
> 'close': True,
> 'color by SS...': False,
> 'compute SS': True,
> 'copy/combine...': True,
> 'deactivate': False,
> 'focus': True,
> 'hide': False,
> 'match...': True,
> 'minimize...': False,
> 'rainbow...': True,
> 'rename...': True,
> 'render/sel by attr...': True,
> 'select': True,
> 'select chain(s)...': True,
> 'sequence...': True,
> 'show': False,
> 'show all atoms': True,
> 'show only': True,
> 'surface main': True,
> 'tile...': True,
> 'toggle active': True,
> 'trace backbones': True,
> 'trace chains': True,
> 'transform as...': True,
> 'write PDB': True},
> 'lastUse': 1268231127.7550001},
> 'Nucleotides': {'slab styles': {}},
> 'Ribbon Styles': {'atoms': {}, 'scaling': {}, 'xsections': {}},
> 'Tools': {'autoStart': {},
> 'confirmOnStart': {},
> 'dirList': [],
> 'inFavorites': {'Command Line': 2,
> 'Model Panel': 0,
> 'Reply Log': 4,
> 'Sequence': 3,
> 'Side View': 1},
> 'onToolbar': {}},
> 'command line gui': {'remembered commands': ['select #0:2-182.A at C',
> 'write selected format
> pdb 0 E:\\A.Model_receptor\\PDB_MODELS\\1W72_c.pdb']},
> 'initial size': {'Window size': (525, 513)},
> 'miller browser': {'dirHistory': [u'E:\\A.Model_receptor\
> \Chimera_log_parser',
> 'C:\\Users\\wiason\\Desktop'],
> 'fileHistory': {'': [u'E:\\A.Model_receptor\
> \Chimera_log_parser\\RMSD_raw.txt',
> u'E:\\A.Model_receptor\
> \PDB_MODELS\\peptide_chain\\reply_log',
> u'C:\\Users\\wiason\\Desktop
> \\try_combining2.pdb',
> u'C:\\Users\\wiason\\Desktop
> \\try_combining.pdb'],
> 'main chimera import dialog':
> [u'E:\\A.Model_receptor\\model_env\\calc_receptor_rmsds.cmd',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\peptide_chain\
> \extract_peptide_from_PDB.cmd',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\3D39.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\3D39.fasta',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\3DTX.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\3B3I.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\2JCC.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\2J8U.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\1LP9.pdb',
>
> u'E:\\A.Model_receptor\\PDB_MODELS\\1B0G.pdb']},
> 'lastFilter': {'main chimera import dialog':
> 'all (guess type)'}},
> 'update check': {'last time': (2010, 3, 3, 12, 50, 48, 371000,
> None)},
> 'version tracking': {'last version': '1.4_b29093'},
> 'write PDB dialog': {'multiSavePDB': 'single'}}
>
> ****************************************************************************************************
>
>
>
>
> From: Eric Pettersen [mailto:pett at cgl.ucsf.edu]
> Sent: 10 March 2010 3:17 AM
> To: Sumitro Harjanto
> Cc: chimera-users at cgl.ucsf.edu
> Subject: Re: [Chimera-users] Scripting to write / save multiple
> models into single pdf file
>
> Hmm, it seems that you have the Model Panel set to autostart in your
> preferences. Now, Chimera probably should ignore autostarting tools
> when it is in nogui mode, but currently it doesn't. So what you
> will have to do for now (until we fix this) is to start Chimera
> normally, turn off the autostart of the Model Panel (and any other
> graphical tools probably), save the new preferences, and then run
> your script.
>
> If you look in the "Preferences" preference category, it will show
> the location of the preferences file. You could squirrel away your
> original preferences file somewhere, make the version with no
> autostarting, copy that somewhere, and then put your original
> version back. You would then be able to use the no-autostarting
> preferences by specifying it's location with the --preferences
> startup option.
>
> --Eric
>
> Eric Pettersen
> UCSF Computer Graphics Lab
> http://www.cgl.ucsf.edu
>
> On Mar 8, 2010, at 7:32 PM, Sumitro Harjanto wrote:
>
>
> Hi Eric,
>
> Thanks for the suggestion. I don’t really script, I usually use a c+
> + code / excel to generate the command (.cmd) files. Should be okay
> for the automation for now, if I run into any problem then I will
> post it up here again. =]
>
> Mean while I try running the command “chimera.exe –nogui” in PATH/
> chimera/bin but got the following error message. I followed the
> instruction and copy over the debug message (below). any advise? I’m
> on a win7 X86 platform btw.
>
> Thanks,
> Sumitro
>
> -----------------------------------------------------------------------------------------------------
>
> Chimera failed abnormally; the exit code was: 1
> Use –debug command line option for the full error message.
>
> --------------------------------------------------------------------------------------------------
> Cannot execute 'gzip': no automatic decompression of .Z files
> Traceback (most recent call last):
> File "E:\Chimera\share\__main__.py", line 65, in <module>
> value = chimeraInit.init(sys.argv)
> File "E:\Chimera\share\chimeraInit.py", line 401, in init
> extension.startup(startExtensions)
> File "E:\Chimera\share\chimera\extension\base.py", line 1056, in
> startup
> manager.autostartTools(extNames)
> File "E:\Chimera\share\chimera\extension\base.py", line 959, in
> autostartTools
>
> emo.activate()
> File "E:\Chimera\share\ModelPanel\ChimeraExtension.py", line 23,
> in activate
> display(self.module('base').ModelPanel.name)
> File "E:\Chimera\share\chimera\dialogs.py", line 77, in display
> dialog = find(name, create=1)
> File "E:\Chimera\share\chimera\dialogs.py", line 62, in find
> return d()
> File "E:\Chimera\share\chimera\baseDialog.py", line 523, in __init__
> BaseDialog.__init__(self, master, *args, **kw)
> File "E:\Chimera\share\chimera\baseDialog.py", line 244, in __init__
> self.fillInUI(self.__top)
> File "E:\Chimera\share\ModelPanel\base.py", line 217, in fillInUI
> self._addColumns()
> File "E:\Chimera\share\ModelPanel\base.py", line 436, in _addColumns
> self._buildTable()
> File "E:\Chimera\share\ModelPanel\base.py", line 454, in _buildTable
> % len(filter(lambda s: s == 1, self.shownColumns)))
> File "E:\Chimera\bin\Lib\lib-tk\Tix.py", line 1306, in __init__
> cnf, kw)
> File "E:\Chimera\bin\Lib\lib-tk\Tix.py", line 307, in __init__
> self.tk.call(widgetName, self._w, *extra)
> _tkinter.TclError: invalid command name "tixScrolledHList"
> Return code: 1
> Press return or enter to to exit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20100311/7c7674f1/attachment.html>
More information about the Chimera-users
mailing list