VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Feb 06 2012 - 10:58:26 CST
- Next message: Ban Arn: "Re: Tcl script error"
- Previous message: Ban Arn: "Tcl script error"
- In reply to: Ban Arn: "Tcl script error"
- Next in thread: Ban Arn: "Re: Tcl script error"
- Reply: Ban Arn: "Re: Tcl script error"
- Maybe reply: Axel Kohlmeyer: "Re: Tcl script error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
It would seem that $ftemp is getting set to a non-numeric value.
Try adding a puts command in there to print $ftemp each time in the
foreach loop, and I suspect you'll find your problem.
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Mon, Feb 06, 2012 at 04:50:14PM +0000, Ban Arn wrote:
> Dear VMD Users
>
> I'm using following script
>
> foreach l [array names f] {
> set w($l) {}
> set fsum 0
> foreach ftemp $f($l) {
> set fsum [expr $fsum + $ftemp * $v * $dt]
> lappend w($l) $fsum
> }
> }
>
> for the calculation of work done for 10 simulations.
>
> While running the script it shows error as "missing operand at _@_
> in expression "0.25771 + _@_* 1 * 1"
>
> I'm not a tcl expert. Kinldy advice.
>
> Many Thanks
> Balaji
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349 http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
- Next message: Ban Arn: "Re: Tcl script error"
- Previous message: Ban Arn: "Tcl script error"
- In reply to: Ban Arn: "Tcl script error"
- Next in thread: Ban Arn: "Re: Tcl script error"
- Reply: Ban Arn: "Re: Tcl script error"
- Maybe reply: Axel Kohlmeyer: "Re: Tcl script error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]