<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Elaine,<br>
<br>
I found the problem: I put rc("close session") one line before and
it worked:<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>
<font color="#ff0000"> rc("close session")
</font><br>
#rc("saveReplyLog('replyLog%04d.txt')" % i)
<br>
<br>
Many thanks for all your suggestions!<br>
<br>
Damien<br>
<br>
Le 24/01/2011 20:16, Damien Larivière a écrit :
<blockquote cite="mid:4D3DD028.3090004@fourmentinguilbert.org"
type="cite">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>
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>
<br>
dist :246.b@ca :131.c@ca
<br>
<a class="moz-txt-link-rfc2396E" 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>
<br>
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>
<br>
findclash :83.a test :100.b overlap -100 hb 0 log true
<br>
<a class="moz-txt-link-rfc2396E" 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>
<br>
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>
<br>
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>
<a class="moz-txt-link-rfc2396E" href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html"><http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html></a>
<br>
<br>
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>
<br>
processing file1
<br>
[a bunch of lines of findclash output including distances]
<br>
<br>
processing file2
<br>
[a bunch of lines of findclash output including distances]
<br>
<br>
... etc.
<br>
<br>
That would still require some "manual" looking through the Reply
Log. I hope this helps,
<br>
Elaine
<br>
----------
<br>
Elaine C. Meng, Ph.D.
<br>
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
<br>
Department of Pharmaceutical Chemistry
<br>
University of California, San Francisco
<br>
<br>
On Jan 23, 2011, at 10:48 AM, Damien Larivière wrote:
<br>
<br>
<blockquote type="cite">Dear all,
<br>
I have numerous PDB files resulting from a docking run.
<br>
<br>
From crosslinking experiments, we know here that one way to
select
<br>
among all the solutions is to identify the PDB files for which
the
<br>
distance between some residues of interest is lower than a
specific value:
<br>
<br>
distance between Res 246 in chain B and Res 131 chain C<
17 A
<br>
distance between Res 162 in chain B and Res 135 chain C<
24 A
<br>
<br>
The two constraints must be respected.
<br>
<br>
So, is it possible to write a script which:
<br>
<br>
- opens one by one the pdb files,
<br>
<br>
-calculates the two distances for the current pdb file,
<br>
<br>
- send in the reply log the name-number of this PDB file if it
respects
<br>
the two constraints?
<br>
<br>
Then, I would just have a look to the reply log in order to
know the pdb
<br>
files to study in depth.
<br>
<br>
Many thanks for your help
<br>
Damien
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>