From: J. Rui Rodrigues (joaquim.rodrigues_at_estg.ipleiria.pt)
Date: Thu Mar 12 2009 - 06:16:17 CDT

Hi,

You must update the selection inside the for loop:

for {set frame 0} {$frame < $num_steps} {incr frame} {
  $l frame $framels
  set minmax [measure minmax $l]
  puts $outfile "$frame $minmax"
}

and delete your selection when you don't need it anymore (outside
the for loop):
$l delete

Hope this helps,
Rui Rodrigues

On Thu, 12 Mar 2009 01:40:50 -0700, Christopher Hartshorn wrote
> Hello all. I must apologize up front for my lack of knowledge of the
> TCL scripting interface. But with that said, I can not for the life
> of me figure out why my script is not working. The script:
>
> set l [atomselect top "resname DMPC" frame 0]
> set minmax [measure minmax $l]
> set num_steps [molinfo top get numframes]
> set outfile [open minmaxDMPC.txt w]
> for {set frame 0} {$frame < $num_steps} {incr frame} {puts $outfile
> "[expr {$frame+1}] [lindex $minmax $frame]"}
> close $outfile
>
> In this script, I am trying to spit out the minmax dimensions of a
> given selection (the bilayer, in this case) of my simulation for each
> frame of the trajectory and then have it written to a text file
> (minmaxDMPC.txt). But all I get, no matter what combination I try, is
> a text file with 1-->700 in the first column (there are 700 frames)
> and the minmax for the first frame ONLY in the second column (e.g. one
> set of 6 values in the 1st row of the 2nd column only). I know this
> is a common question on this listserv, but even after looking at
> example scripts and the questions/answers of the listserv I am still
> just not getting it, I guess.
>
> Thank you up front for any help.
>
> Best,
>
> Chris
> WSU

--
Webmail ESTG de Leiria (http://webmail.estg.ipleiria.pt)