From: greddy1_at_umd.edu
Date: Tue Feb 13 2007 - 13:18:58 CST

Hello,
I am new to tcl scripting and I am trying to extract the total energy from the
NAMD log file.

The tcl script I am trying to use it as follows:
-------------------------------
set file [open temp.log r]
set output [open ene.dat w]
while { [gets $file line] != -1 } {
      if {[lindex $line 0] == "ENERGY:"} {
         puts $output "[lindex $line 1] [lindex $line 11]"
      }
}
close $file
close $output
--------------------------------------

When I try to run the script in the TkConsole of VMD I get the following error.
"list element in quotes followed by "," instead of space"

Can somebody please point out the bug in the code.
Thank You
Greddy