From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Feb 06 2012 - 12:02:47 CST

On Mon, Feb 6, 2012 at 12:57 PM, Ban Arn <ban.arn_at_gmail.com> wrote:
> Dear Axel
>
> Initially load this trajectory file, then define dt as 1 and pulling
> velocity as 0.01 & Temperature (inclusing Boltzman constant) as 0.6
> and finally i'll use this script for calculating work done.

i don't follow. where does the file come into play,
and where do you define the "f" array.

i am no mind reader, so i cannot give advice
on stuff that i don't see.

the error that you see, doesn't originate in the part of the code that
you quoted, but some *other* part, most likely where you define "f".

axel.

>
> Many Thanks
> Balaji
>
>
> On Mon, Feb 6, 2012 at 5:54 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>>
>> On Mon, Feb 6, 2012 at 12:51 PM, Ban Arn <ban.arn_at_gmail.com> wrote:
>> > Dear John & Axel
>> >
>> > Kindly find the attachment for reference file which I have been using
>> > for
>> > the above script..
>> >
>> > The file has 11 columns 1st is time step, 2-6 columns are displacement
>> > and
>> > 7-11 columns are respective forces.
>>
>> i don't see the relation of this file with the piece of script code.
>>
>> axel.
>>
>>
>> >
>> > Kindly advice.
>> >
>> > Many Thanks
>> > Balaji
>> >
>> >
>> >
>> > On Mon, Feb 6, 2012 at 5:46 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>> > wrote:
>> >>
>> >> On Mon, Feb 6, 2012 at 11:50 AM, Ban Arn <ban.arn_at_gmail.com> 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.
>> >>
>> >> ...and we don't know what you have in your "f" array.
>> >> apparently no numbers.
>> >>
>> >> axel.
>> >>
>> >>
>> >> >
>> >> > Many Thanks
>> >> > Balaji
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dr. Axel Kohlmeyer
>> >> akohlmey_at_gmail.com  http://goo.gl/1wk0
>> >>
>> >> College of Science and Technology
>> >> Temple University, Philadelphia PA, USA.
>> >
>> >
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer
>> akohlmey_at_gmail.com  http://goo.gl/1wk0
>>
>> College of Science and Technology
>> Temple University, Philadelphia PA, USA.
>
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science and Technology
Temple University, Philadelphia PA, USA.