[Chimera-users] Problem with a script calculating distance between residues in a single pdb file with several models

Tom Goddard goddard at sonic.net
Fri Aug 5 10:04:12 PDT 2011


Hi Damien,

   Python uses indentation for "for" loops and other code blocks.  So 
you just need to indent the rc(...) line in the for loop by one or more 
spaces.  If you end up adding more lines inside the "for" loop they all 
have to be indented by the same number of spaces.

     Tom

> Dear all,
>
> Here is a single pdb file called modetest_14.pdb. It contains 6 
> structures: 1 protein MutS (only chain B) with 5 different 
> conformations + another protein MutL (chains A and B).
>
> In Chimera, the protein with the 5 different conformations is 
> displayed as model 0.1 to 0.5. The other protein is model 0.6.
>
> I would like to calculate the distance between the residue 239 of MutS 
> chain B (for the 5 conformations) and the residue 169 of MutL chain A.
>
> I wrote this script which reports this error message:  expected an 
> indented block (scriptdistance.py, line 4)
>
> *from chimera import runCommand as rc
> rc(r"open C:\Program Files (x86)\Hex 6.3\examples\New Hex 
> run_SL_250211\FirstRun_S_Ldimer\New_filtering\Eucl_Dist_S246-L297\Top 
> solutions\SL0265B\dockLH248\NMA\Test\modetest_14.pdb")
> for i in range(1, 6):
> rc("distance #0.%d:239.B at N #0.6:169.A at N" % i)*
>
> May you tell me what is wrong? the script correctly opens the file so 
> I suppose it is the python string #0.%d (intended to specify 0.1, 
> 0.2,... 0.5)!?
>
> Thanks for your help
>
> Damien
>
>
> _______________________________________________
> 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/20110805/48476533/attachment.html>


More information about the Chimera-users mailing list