From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Aug 28 2006 - 11:41:53 CDT

alex,
you are missing the closing brace to the 'for'-loop over all trajectory frames.
this kind of error can be most easily detected, if you use a text editor
that supports indenting.

cheers,
  axel.

On 8/28/06, alexandra.marques_at_fc.up.pt <alexandra.marques_at_fc.up.pt> wrote:
> Hi again
>
> Sorry, forget my previous mail. I was using a wrong pdb file...
> I have another question related with this script. I want to change it to write
> the list of waters molecules for each frame, instead of writing a pdb file for
> each frame. My modified script is:
>
> set outfile [open waters.txt w]
> set sel [atomselect top "name O and resname WAT and within 2 of residue 0"]
> set n [molinfo top get numframes]
> for { set i 0 } { $i < $n } { incr i } {
> $sel frame $i
> $sel update
> set residuelist [$sel get residue]
> puts "list of waters within 2 of residue 0:"
> puts "$residuelist"
> foreach res $residuelist {
> puts $outfile "Frame $i, $residuelist"
> }
> close $outfile
>
> However something is wrong as I am having the following error: missing
> close-brace. As I donīt know too much about tcl scripting, could someone
> please
> take a look and tell me what am I doing wrong?
>
> Thanks!
> Alex
>
>
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.