From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Aug 28 2006 - 11:33:18 CDT

Hi,
  Oops, too late.. (I usually read my emails in order of receipt...)
I'm glad you solved the first part of your problem.
The missing close brace belongs right before your "close $outfile" call.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Aug 28, 2006 at 04:52:03PM +0100, 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
>
>
>
> Quoting alexandra.marques_at_fc.up.pt:
>
> >Hi
> >
> >I want to identify the water molecules within 2 angstroms of certain
> >residues
> >for each frame of a trajectory. I am using the following script:
> >
> >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
> >$sel writepdb water_$i.pdb
> >}
> >
> >However I am having problems with the numbering of the waters. For
> >instance, for
> >residue 0 and frame 0 I obtain one water molecule with the number X1546.
> >However, If I apply the same script only to the pdb file corresponding to
> >the
> >frame 0, the same water molecule is now numbered 910, which is correct. It
> >seems that the water molecules in the trajectory are being wrongly
> >numbered...
> >
> >What am I doing wrong? Is there any other simple way to do this type of
> >analysis? My trajectory is from amber.
> >
> >
> >Thanks in advance
> >Alexandra
> >
> >
> >
> >-------------------------------------------------------------
> >A FCUP utiliza o sistema de webmail Horde/IMP (www.horde.org)
> >
> >Visite: http://www.fc.up.pt/
> >
> >
>
>
>
> -------------------------------------------------------------
> A FCUP utiliza o sistema de webmail Horde/IMP (www.horde.org)
>
> Visite: http://www.fc.up.pt/
>
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078