From: Yixin Chen (yixin.chen1_at_ucdconnect.ie)
Date: Fri Nov 03 2023 - 05:11:19 CDT

 Hi Josh,

Thank you for your reply! I opened the tkConsole from the Extensions menu.
When it reported an error, it did accurately give the error of a certain
line. However, now it can run and i did nothing more. I think the error is
related to my system.
If there are any other people who have the same problem, my approach might
work. please type sudo dpkg-reconfigure dash in terminal and select no.
Thank you again!

Best regards,
Yixin

On Thu, 2 Nov 2023 at 20:36, Josh <vermaasj_at_msu.edu> wrote:

> Hi Yixin,
>
> Did you change the tkConsole to run bash? I did not know this was
> possible. The rmsd.tcl script is meant to be interpreted by a tcl
> interpreter. I don't think this is happening, since the tcl interpreter
> never reports a line number when it throws an error, much to my annoyance.
> Are you opening the tkConsole from the Extensions menu? Or are you putting
> the command directly into the terminal that opens when VMD opens?
>
> -Josh
>
> On 10/31/23 11:55 AM, Yixin Chen wrote:
>
> Dear all,
>
> I am a beginner of VMD and NAMD, I follow the NAMD TUTORIAL to study. I am
> in the section of 1.8 Analysis of Water Sphere Equilibration
> when I run the rmsd.tcl on Tk Console, there is an error:* bad for loop
> variable*. to handle the error I use sudo dpkg-reconfigure dash and
> select no to Change the default shell to bash.
> After the chage, the error is also changed : *line 7: syntax error near
> unexpected token `i' and line 7: `for {set i 1} {$i <= $nf} {incr i} {'*
> Is there anyone who could help me to find the problem, thank you so much!
>
> I use the Ubuntu 22.04.3 64 ; NAMD 3.0b4 linux x86_64; vmd-1.9.4a57
> the rmsd.tcl file is get from required tutorial files witch download from
> the the web.
> the code is:
>
>
>
>
>
>
>
>
>
>
> *set outfile [open rmsd.dat w] set nf [molinfo top get numframes] set
> frame0 [atomselect top "protein and backbone and noh" frame 0] set sel
> [atomselect top "protein and backbone and noh"] # rmsd calculation loop for
> { set i 1 } { $i <= $nf } { incr i } { $sel frame $i $sel move [measure fit
> $sel $frame0] puts $outfile "[measure rmsd $sel $frame0]" } close $outfile*
>
> Best regards,
> Yixin
>
>
> --
> Josh Vermaas
> vermaasj_at_msu.edu
> Assistant Professor, Plant Research Laboratory and Biochemistry and Molecular Biology
> Michigan State Universityvermaaslab.github.io
>
>