<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">My previous reply was kind of misleading. Windows does know about standard input/output, but only for "console" apps, not GUI apps. Chimera tries to be both. So instead of bring up a console window, you can simply redirect standard output (which will have your RMSD info) into a file, like so:<div><br></div><div><div lang="EN-SG" link="blue" vlink="blue"><div><div>E:\Chimera\bin>chimera --nogui myscript.py > E:\rmsds.txt</div><div><br></div><div>Don't use the saveReplyFunction in nogui mode since it will always produce an empty file (since there is no reply log).</div><div><br></div><div>--Eric</div><div><br></div><div><span class="Apple-style-span" style="font-size: 16px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> Eric Pettersen</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> UCSF Computer Graphics Lab</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></div><div><br></div></span></div></div></div><div><div>On Mar 14, 2010, at 11:12 PM, Sumitro Harjanto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-SG" link="blue" vlink="blue" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Hi Eric,<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I managed to figure out something by pirating some python codes I found from chimera mailing list through googling. I want to use the code to save my reply log, which is going to be about 3.4 million lines (by the way, is there a maximum buffer for the number of lines reply log can take? I feared overrunning the buffer and losing my some part of the replylog)<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Below is the code; I commented away the part I do not use from the original code.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I tried the code by opening it using the chimera gui, and it worked just fine, producing the log file I want. But when I tried opening the same code using command line the log file was produced, but empty.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I tried :<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">E:\Chimera\bin>chimera --nogui save_replylog.py <- - doesnot show anything, no popup command window, nothing.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">E:\Chimera\bin>chimera --nogui --debug save_replylog.py <- - shows a new pop up window<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Both commands created my log file, but were both empty files.<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">I would want to run the script later in nogui mode, but I need to retrieve the log for rmsd values, therefore I need to overcome this problem. Any advise..?<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Thanks!<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Cheers,<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Sumitro<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">********************************************************************************************************************</span></font><font size="2" color="navy" face="Arial"><span lang="EN-GB" style="font-size: 10pt; font-family: Arial; color: navy; "><o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">from chimera import runCommand<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">from chimera.tkgui import saveReplyLog<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#def rms2ref(ref, pose, no):<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># runCommand('open %s; open %s' % (ref, pose))<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># i = 1<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># while i <= no:<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># # only hetatms are included --> ~@/element=h<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># runCommand('sel #1.%i & ~@/element=h' % i)<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># runCommand('rmsd #0 sel')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># i += 1<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#rms2ref('lig_cryst.pdb', 'poses.sdf', 10)<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('open noprefs E:\\D.combine\\receptor_models\\A-0101_1W72_A.pdb')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('open noprefs E:\\A.Model_receptor\\PDB_MODELS\\1DUZ.pdb')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('open noprefs E:\\D.combine\\chain_models\\A-0101_ITLVYKVYY_2CIK.pdb')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('rmsd #0:@ca #1:2-182.A@ca')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('match #0:@ca,n,c,o #1:2-182.A@ca,n,c,o')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('match #2:1-3.C,7-9.C@ca #1:1-3.C,7-9.C@ca ')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('match #2:1-3.C,7-9.C@ca,n,c,o #1:1-3.C,7-9.C@ca,n,c,o ')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('combine #0|#2:1-9.C name A-0101_ITLVYKVYY_2CIK.C.(1DUZ.C).A-0101_1W72_A modelId 5')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('write format pdb 5 E:\\D.combine\\complex\\A-0101_ITLVYKVYY_2CIK.C.(1DUZ.C).A-0101_1W72_A.pdb')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">runCommand('close all')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># generate output from replyLog.txt<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">saveReplyLog('e:\\D.combine\\mylog.txt')<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "><o:p> </o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#rmsds = []<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#for i in open('mylog2.txt').readlines():<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># if i.startswith('RMSD between'):<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; "># rmsds.append(i.split()[-2])<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">#print rmsds<o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Courier New"><span lang="EN-US" style="font-size: 11pt; font-family: 'Courier New'; ">*********************************************************************************</span></font><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p></o:p></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p> </o:p></span></font></div><div><div class="MsoNormal" align="center" style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman'; text-align: center; "><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size: 12pt; "></span></font></div></div></div></div></blockquote></div><br></div><br><font class="Apple-style-span" size="4"><span class="Apple-style-span" style="font-size: 16px;"><span class="Apple-style-span" style="font-size: medium;"><br></span></span></font><div apple-content-edited="true"> </div><br></body></html>