VMD-L Mailing List
From: Ban Arn (ban.arn_at_gmail.com)
Date: Mon Feb 06 2012 - 11:28:12 CST
- Next message: Rajan Vatassery: "Re: PSFGEN and Reading Bonds from PDB Files"
 - Previous message: Axel Kohlmeyer: "Re: Tcl script error"
 - In reply to: John Stone: "Re: Tcl script error"
 - Next in thread: Axel Kohlmeyer: "Re: Tcl script error"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 
 Dear John
How to overcame this error.
Kindly advice.
Many Thanks
Balaji
On Mon, Feb 6, 2012 at 5:23 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>
> So if it has correct data at the start, it would seem that you're
> reading some bad data into the end of your array?  Perhaps one of the
> files you're reading is truncated or the code that's reading it
> isn't realizing it has reached the end of the file?
>
> Cheers,
>  John Stone
>  vmd_at_ks.uiuc.edu
>
> On Mon, Feb 06, 2012 at 05:12:12PM +0000, Ban Arn wrote:
> >    Dear John
> >
> >    I have added puts command in $ftemp, its gives value for 1st time
> step and
> >    later it gives the same error.
> >
> >    foreach l [array names f] {
> >       set w($l) {}
> >       set fsum 0
> >       foreach ftemp $f($l) {
> >           puts $ftemp
> >           set fsum [expr $fsum + $ftemp * $v * $dt]
> >           lappend w($l) $fsum
> >       }
> >    }
> >
> >    Kindly advice, how to modify the script.
> >
> >    Many Thanks
> >    Balaji
> >
> >    On Mon, Feb 6, 2012 at 4:58 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> >      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
>
> --
> 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: Rajan Vatassery: "Re: PSFGEN and Reading Bonds from PDB Files"
 - Previous message: Axel Kohlmeyer: "Re: Tcl script error"
 - In reply to: John Stone: "Re: Tcl script error"
 - Next in thread: Axel Kohlmeyer: "Re: Tcl script error"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 



