From: Molybdos Kirkimpolakis (supercomputer.simulation_at_gmail.com)
Date: Fri Dec 02 2011 - 10:34:27 CST

Dear VMD Master,

I was wondering if my last post should be posted in namd list? I am still
strugguling with this tcl script that is not working. Can anyone please
point why I am getting the error of "unmatched open brace in list". I
checked and it seems that there is no missing brace.

Thanks so much.

Here is the script.

#####################################
> ### Open the log file for reading and the output .dat file for writing
> set file [open SMD.log r]
> set output [open analysis/force.dat w]
>
> ### Loop over all lines of the log file
> set file [open SMD.log 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] [lindex $line 5] [lindex $line 6]
> [lindex $line 7]"
> }
> }
>
> ### Close the log file and the output .dat file
> close $file
> close $output
> #######################################################################

2011/11/30 Molybdos Kirkimpolakis <supercomputer.simulation_at_gmail.com>

> Dear VMD Masters,
> I'm trying to read the SMD information from the log file; using the tcl
> script provided by namd tutorial; however I am geting the follwing error
>
> unmatched open brace in list
>
> Can someone tell me what is wrong?
>
> Thanks so much for your help.
>
> Here is the script.
>
> ###################################################################
> ### Open the log file for reading and the output .dat file for writing
> set file [open SMD.log r]
> set output [open analysis/force.dat w]
>
> ### Gather input from user.
>
>
> ### Loop over all lines of the log file
> set file [open SMD.log 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] [lindex $line 5] [lindex $line 6]
> [lindex $line 7]"
> }
> }
>
> ### Close the log file and the output .dat file
> close $file
> close $output
> #######################################################################
>
>
> --
> cheers
>
> Molybdos Kirkimpolakis
>
> Πανεπιστήμιο Πατρών <http://www.biology.upatras.gr>
>
> ΤΜΗΜΑ ΒΙΟΛΟΓΙΑΣ
>
>
>

-- 
cheers
Molybdos Kirkimpolakis
Πανεπιστήμιο Πατρών <http://www.biology.upatras.gr>
ΤΜΗΜΑ ΒΙΟΛΟΓΙΑΣ