<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dear Chimera developers,<br>
<br>
I've got a problem with scripting in chimera. By analogy with your
example I've written a python script for geometry optimization of
small library of ligands. In GUI mode all commands run smoothly as I
type them into chimera command line. Nevertheless, when I try to run
a script containing the same commands I get the error `unrecognized
command: "minimize"`, no matter if I run it from GUI interface menu
or with --nogui parameter. <br>
<br>
Here is my testing script (test.py): <br>
<br>
<blockquote> import os<br>
import chimera<br>
from chimera import runCommand as rc <br>
from chimera import replyobj <br>
os.chdir("/home/viachaslau/sybyl/sublib/")<br>
fn = "lib1.mol2"<br>
rc("open " + fn)<br>
rc("miminize nsteps 70000 stepsize 0.001 interval 100 freeze none
nogui true")<br>
rc("write format pdb 0 min/" + fn + ".pdb")<br>
rc("close all")<br>
rc("stop now")<br>
</blockquote>
And here is the output from Python:<br>
<br>
<blockquote>~/sublib> ~/chimera/bin/chimera --nogui test.py<br>
Executing test.py...<br>
Opening lib1.mol2...<br>
UNQ1 opened<br>
<br>
Traceback (most recent call last):<br>
File "/home/viachaslau/chimera/share/chimeraInit.py", line 677,
in init<br>
chimera.openModels.open(a, prefixableType=1)<br>
File "/home/viachaslau/chimera/share/chimera/__init__.py", line
1541, in open<br>
models = func(filename, *args, **kw)<br>
File "/home/viachaslau/chimera/share/chimera/__init__.py", line
973, in _openPython<br>
loadFunc(sandboxName, fileName, f)<br>
File "test.py", line 8, in <module><br>
rc("miminize nsteps 70000 stepsize 0.001 interval 100 freeze
none nogui true")<br>
File "/home/viachaslau/chimera/share/chimera/__init__.py", line
2235, in runCommand<br>
makeCommand(*args, **kw)<br>
File "/home/viachaslau/chimera/share/Midas/midas_text.py", line
78, in makeCommand<br>
'Unrecognized command: "%s"' % cmd<br>
MidasError: Unrecognized command: "miminize"<br>
Error while processing test.py:<br>
MidasError: Unrecognized command: "miminize"<br>
<br>
File "/home/viachaslau/chimera/share/Midas/midas_text.py", line
78, in makeCommand<br>
'Unrecognized command: "%s"' % cmd<br>
<br>
See reply log for Python traceback.<br>
</blockquote>
I run SUSE 11.3 as operating system and chimera is installed into
~/chimera/<br>
I also tried to run commands row by row in IDLE window of chimera
and found out that python suspends on runCommand("minimize ...")
command<br>
<pre class="moz-signature" cols="72">--
Viachaslau Bernat, PhD-student
Department Chemistry and Pharmacy
Schuhstrasse 19, 91052 Erlangen – Germany
Phone: +49-9131-8522588
<a class="moz-txt-link-abbreviated" href="http://www.medchem.uni-erlangen.de">www.medchem.uni-erlangen.de</a></pre>
</body>
</html>