[Chimera-users] selection (from distance) among PDB files after docking

Eric Pettersen pett at cgl.ucsf.edu
Mon Jan 24 11:23:01 PST 2011


Hi Damien,
	You need to close the first model you opened before opening the  
second one (otherwise ":162.B at N" selects two atoms instead of one,  
etc.).  So at the end of your loop put a

	rc("close all")

[or rc("close 0")]

--Eric

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         http://www.cgl.ucsf.edu

On Jan 24, 2011, at 11:16 AM, Damien Larivière wrote:

> Dear Elaine,
>
> Many thanks for your reply.
>
> 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.
>
> So I followed your proposition of a script and I wrote the following  
> for which I meet a chimera error:
>
> from chimera import runCommand as rc
> #from chimera.tkgui import saveReplyLog
> for i in range(1, 3):
>    rc(r"open C:\Program Files (x86)\Hex 6.3\examples\New Hex  
> run_240111\Docking_results\240111\dock%04d.pdb" % i)
>    rc("distance :93.B at N :131.C at N")
>    rc("distance :246.B at N :131.C at N")
>    rc("distance :162.B at N :135.C at N")
>    #rc("saveReplyLog('replyLog%04d.txt')" % i)
> rc("close session")
>
> 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...
>
> 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).
>
> May you tell me what's wrong?
>
> Many thanks for your help
>
> Damien
>
>
> Le 24/01/2011 18:30, Elaine Meng a écrit :
>> Hi Damien,
>> 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
>>
>> dist :246.b at ca :131.c at ca
>> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/distance.html>
>>
>> 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
>>
>> findclash :83.a test :100.b overlap -100 hb 0 log true
>> <http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/ 
>> findclash.html>
>>
>> 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.
>>
>> 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:
>> <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html 
>> >
>>
>> 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
>>
>> processing file1
>> [a bunch of lines of findclash output including distances]
>>
>> processing file2
>> [a bunch of lines of findclash output including distances]
>>
>> ... etc.
>>
>> That would still require some "manual" looking through the Reply  
>> Log.  I hope this helps,
>> Elaine
>> ----------
>> Elaine C. Meng, Ph.D.
>> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>> On Jan 23, 2011, at 10:48 AM, Damien Larivière wrote:
>>
>>> Dear all,
>>> I have numerous PDB files resulting from a docking run.
>>>
>>> From crosslinking experiments, we know here that one way to select
>>> among all the solutions is to identify the PDB files for which the
>>> distance between some residues of interest is lower than a  
>>> specific value:
>>>
>>> distance between Res 246 in chain B and Res 131 chain C<  17 A
>>> distance between Res 162 in chain B and Res 135 chain C<  24 A
>>>
>>> The two constraints must be respected.
>>>
>>> So, is it possible to write a script which:
>>>
>>> - opens one by one the pdb files,
>>>
>>> -calculates the two distances for the current pdb file,
>>>
>>> - send in the reply log the name-number of this PDB file if it  
>>> respects
>>> the two constraints?
>>>
>>> Then, I would just have a look to the reply log in order to know  
>>> the pdb
>>> files to study in depth.
>>>
>>> Many thanks for your help
>>> Damien
>>
>
> <ChimeraError.txt>_______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20110124/d65d5634/attachment.html>


More information about the Chimera-users mailing list