From: Mario Valle (mvalle_at_cscs.ch)
Date: Mon Aug 28 2006 - 11:24:30 CDT

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"
> }
  } <<<<<<<<<<<<<<<<<<< Add this brace
> 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
>
>

-- 
Ing. Mario Valle
Visualization Group                              | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82