<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Damien,<div><span class="Apple-tab-span" style="white-space:pre"> </span>You need to close the first model you opened before opening the second one (otherwise ":162.B@N" selects two atoms instead of one, etc.). So at the end of your loop put a</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>rc("close all")</div><div><br></div><div>[or rc("close 0")]</div><div><br></div><div>--Eric</div><div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 16px; "><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-size: 16px; "><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-size: 16px; "><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><div><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "><br></font></div><div><div>On Jan 24, 2011, at 11:16 AM, Damien Larivière wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear Elaine,<br><br>Many thanks for your reply.<br><br>I choose not to use the findclash command simply because the distance between one atom of the residue (here N) and the same atom in the other residue is enough for me. But I will remind the proposition.<br><br>So I followed your proposition of a script and I wrote the following for which I meet a chimera error:<br><br>from chimera import runCommand as rc<br>#from chimera.tkgui import saveReplyLog<br>for i in range(1, 3):<br> rc(r"open C:\Program Files (x86)\Hex 6.3\examples\New Hex run_240111\Docking_results\240111\dock%04d.pdb" % i)<br> rc("distance :93.B@N :131.C@N")<br> rc("distance :246.B@N :131.C@N")<br> rc("distance :162.B@N :135.C@N")<br> #rc("saveReplyLog('replyLog%04d.txt')" % i)<br>rc("close session")<br><br>It says that Chimera has to open a file called dock0001.pdb, calculate three distances which are sent into the replylog, close the file; then open dock0002.pdb calculate three distances...<br><br>I only specified "i in range (1, 3)" to test the script with just 2 files. When "i in range (1, 2)" Chimera effectively opens dock0001.pdb and does all the distance measurements. But when "i in range (1, 3)" I have an error (see the chimeraError.txt which is a copy of the ReplyLog).<br><br>May you tell me what's wrong?<br><br>Many thanks for your help<br><br>Damien<br><br><br>Le 24/01/2011 18:30, Elaine Meng a écrit :<br><blockquote type="cite">Hi Damien,<br></blockquote><blockquote type="cite">First consider which commands you would use on each file and try them out in the command line on an example file. If you only wanted CA-CA distances, each residue pair would require one command, something like<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">dist :246.b@ca :131.c@ca<br></blockquote><blockquote type="cite"><<a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/distance.html">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/distance.html</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That automatically sends the distance to the Reply Log. However, it sounds like you might want to measure all pairwise distances from all atoms in one residue to all atoms in the other residue. It could be done with a lot of distance commands naming the atoms, but one way to do it in only a single Chimera command is to stretch the function of "findclash" and force it to report all pairwise distances, something like<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">findclash :83.a test :100.b overlap -100 hb 0 log true<br></blockquote><blockquote type="cite"><<a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/findclash.html">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/findclash.html</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The large negative overlap means to just consider everything a contact and report it even if large as 100 angstroms, hb 0 means no special treatment of H-bonds, and log true means to send all the pairwise distance information to the Reply Log. This will be several lines of output. To do something fancier and only output the smallest distance would require Python, which is beyond my skills.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So let's say that for each structure, you chose to run a few "findclash" commands, one for each pair of residues. Next consider that you will need to loop through structures. Here is general information on how to use Python to loop through structures:<br></blockquote><blockquote type="cite"><<a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That example also includes putting a "processing filename" message in the Reply Log. So if you followed that general procedure, the Reply Log would have<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">processing file1<br></blockquote><blockquote type="cite">[a bunch of lines of findclash output including distances]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">processing file2<br></blockquote><blockquote type="cite">[a bunch of lines of findclash output including distances]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">... etc.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That would still require some "manual" looking through the Reply Log. I hope this helps,<br></blockquote><blockquote type="cite">Elaine<br></blockquote><blockquote type="cite">----------<br></blockquote><blockquote type="cite">Elaine C. Meng, Ph.D.<br></blockquote><blockquote type="cite">UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab<br></blockquote><blockquote type="cite">Department of Pharmaceutical Chemistry<br></blockquote><blockquote type="cite">University of California, San Francisco<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Jan 23, 2011, at 10:48 AM, Damien Larivière wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Dear all,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I have numerous PDB files resulting from a docking run.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> From crosslinking experiments, we know here that one way to select<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">among all the solutions is to identify the PDB files for which the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">distance between some residues of interest is lower than a specific value:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">distance between Res 246 in chain B and Res 131 chain C< 17 A<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">distance between Res 162 in chain B and Res 135 chain C< 24 A<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The two constraints must be respected.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">So, is it possible to write a script which:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- opens one by one the pdb files,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-calculates the two distances for the current pdb file,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- send in the reply log the name-number of this PDB file if it respects<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the two constraints?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Then, I would just have a look to the reply log in order to know the pdb<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">files to study in depth.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Many thanks for your help<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Damien<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br><span><ChimeraError.txt></span>_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><br><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br></div></blockquote></div><br></div><br><br><div apple-content-edited="true"> </div><br></body></html>