<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Since runCommand() doesn't return any value, you need to call the underlying Python rmsd() function, which isn't hard to do. Somewhere at the top of your script put:<div><br></div><div>from Midas import rmsd</div><div><br></div><div>and then replace:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>rc("rmsd #0:{0}-{1} #1:{0}-{1}".format(s,k))</div><div><br></div><div>with:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>val = rmsd("#0:{0}-{1}".format(s,k), "#1:{0}-{1}".format(s,k))</div><div><br></div><div>--Eric</div><div><br><div><div>On May 19, 2015, at 12:45 PM, Michał Kadlof <<a href="mailto:ramidas@gmail.com">ramidas@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Yes it work, but then I have to write and run another script to parse output from chimera which cost HDD access time. I was wonder, if it possible to do it in single script without dumping output to separate file.<div><br></div><div>--</div><div>Michał</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-19 18:53 GMT+02:00 Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word">Hi Michał,<div><span style="white-space:pre-wrap"> </span>Redirecting output from a program into a file is pretty easy in any Unix/Linux shell. This would redirect Chimera's non-error output into a file named "chimera-output.txt":</div><div><br></div><div><span style="white-space:pre-wrap"> </span>chimera <i>chimera-arguments-you-normally-use</i> > chimera-output.txt</div><div><br></div><div>You can also redirect the error output, but the syntax for that depends on the shell you are using. You should be able to easily Google it if you need to do that.</div><div><br></div><div>--Eric</div><div><span class="HOEnZb"><font color="#888888"><br> Eric Pettersen<br> UCSF Computer Graphics Lab<br> <a href="http://www.cgl.ucsf.edu/" target="_blank">http://www.cgl.ucsf.edu</a><br><br></font></span><div><div><div class="h5"><div>On May 19, 2015, at 1:16 AM, Michał Kadlof <<a href="mailto:ramidas@gmail.com" target="_blank">ramidas@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hello,<div><br></div><div>I have a need of calculating about 1000 of RMSDs between two particular regions of reference model and testing model. I would like to do this with chimera script. I'm using chimera-1.10.1-Headless Linux 64-bit and have no access to any GUI.</div><div><br></div><div>Currently my script looks like this:</div><div><br></div><div><div><font face="monospace, monospace">import sys, os, re</font></div><div><span style="font-family:monospace,monospace">from chimera import runCommand as rc</span><br></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><< not important stuff >></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">rc("open %s" % (native))</font></div><div><font face="monospace, monospace">for i in models:</font></div><div><font face="monospace, monospace"> rc("open " + i)</font></div><div><font face="monospace, monospace"> rc("rmsd #0:{0}-{1} #1:{0}-{1}".format(s,k))</font></div><div><font face="monospace, monospace"> rc("close #1")</font><span style="font-family:monospace,monospace"> </span></div><div><font face="monospace, monospace">rc("close all")<br></font></div><div><font face="monospace, monospace">rc("stop now")</font><br></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">This allow me to see output on the screen, but I don't know how to capture it for further processing. I found somewhere something like this:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="monospace, monospace">from chimera.tkgui import saveReplyLog<br></font></div><div><font face="monospace, monospace"><< do something >></font></div><div><font face="monospace, monospace">saveReplyLog('replyLog.txt')</font><br></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">But it seem to work only in versions with GUI.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Please help.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">--</font></div><div><font face="arial, helvetica, sans-serif">best whishes</font></div><div><font face="arial, helvetica, sans-serif">Michał Kadlof</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">University of Warsaw</font></div></div></div></div><span class="">
_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br></span></blockquote></div><br></div><br><br></div></blockquote></div><br></div>
</blockquote></div><br></div></body></html>