<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Viachaslau,<br>
I think the problem is that you got the command spelling wrong.
It should be "minimize", not "mi<font color="#cc0000">m</font>i<font
color="#cc0000">n</font>ize" :-)<br>
<br>
-- scooter<br>
<br>
On 08/18/2011 01:54 AM, Viachaslau Bernat wrote:
<blockquote cite="mid:4E4CD32C.6050701@medchem.uni-erlangen.de"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.medchem.uni-erlangen.de">www.medchem.uni-erlangen.de</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Chimera-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a>
<a class="moz-txt-link-freetext" href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a>
</pre>
</blockquote>
<br>
</body>
</html>