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:from Midas import rmsdand then replace:rc("rmsd #0:{0}-{1} #1:{0}-{1}".format(s,k))with:val = rmsd("#0:{0}-{1}".format(s,k), "#1:{0}-{1}".format(s,k))--EricOn May 19, 2015, at 12:45 PM, Michał Kadlof <ramidas@gmail.com> wrote: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.--Michał2015-05-19 18:53 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:Hi Michał,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":chimera chimera-arguments-you-normally-use > chimera-output.txtYou 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.--Eric
Eric Pettersen
UCSF Computer Graphics Lab
http://www.cgl.ucsf.eduOn May 19, 2015, at 1:16 AM, Michał Kadlof <ramidas@gmail.com> wrote:_______________________________________________Hello,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.Currently my script looks like this:import sys, os, refrom chimera import runCommand as rc<< not important stuff >>rc("open %s" % (native))for i in models:rc("open " + i)rc("rmsd #0:{0}-{1} #1:{0}-{1}".format(s,k))rc("close #1")rc("close all")rc("stop now")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:from chimera.tkgui import saveReplyLog<< do something >>saveReplyLog('replyLog.txt')But it seem to work only in versions with GUI.Please help.--best whishesMichał KadlofUniversity of Warsaw
Chimera-users mailing list
Chimera-users@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users