From: Narender Singh Maan (nsmaan_at_gmail.com)
Date: Mon Jan 29 2007 - 14:47:02 CST

Dear Users
i have a small problem in the tcl analysis script (pasted below) which i
pulled from the namd tutorial page for doing the SMD analysis. When i am
trying to run this script VMD ask me to " list element in quotes followed by
"," instead of space" after i feed in the Nx, ny and nz numbers...Please let
me know how can i modify this script.

............................................................................................................................................................................
# ft.tcl
### Open the log file for reading and the output .dat file for writing
set file [open prod.out r]
set output [open ft.dat w]
### Gather input from user.
puts "Enter a value for n_x:"
set nx [gets stdin]
puts "Enter a value for n_y:"
set ny [gets stdin]
puts "Enter a value for n_z:"
set nz [gets stdin]
### Loop over all lines of the log file
set file [open prod.out r]
while { [gets $file line] != -1 } {

### Determine if a line contains SMD output. If so, write the timestep
followed by f(dot)n to the output file
  if {[lindex $line 0] == "SMD"} {puts $output "[lindex $line 1] [expr
$nx*[lindex $line 5]+ $ny*[lindex $line 6] + $nz*[lindex $line 7]]"}}
### Close the log file and the output .dat file
close $file
close $output
.......................................................................................................................................................................................

thank you
> singh
>