addforce

From: Leandro Martínez (leandromartinez98_at_gmail.com)
Date: Tue Apr 19 2005 - 09:38:50 CDT

Dear all,
I'm trying to use the tclForces script to add a force that has
a variable direction to some atom in my simulation. I have
succeeded to compute the force and store each component
in the variables f(1), f(2) and f(3). Now, when I try to
apply the force using addforce, with

    addforce $atm1 { $f(1) $f(2) $f(3) }

The program fails to run, and error message is bellow. It seems
that I cannot put variables values to define the vector, only scalars.
The addforce works fine with, for example,

    addforce $atm1 { 1. 0. 0. }

but, of course, thats not what I want to do. I have also tried

  set force "$f(1) $f(2) $f(3)"
  addforce $atm1 { $force }

and even

  set force "{ $f(1) $f(2) $f(3) }"
  addforce $atm1 $force

and the errors are the same. Does anybody know how to solve that or
what's the problem?
Thanks,
Leandro.

------------- Processor 0 Exiting: Called CmiAbort ------------
Reason: FATAL ERROR: force not a vector
    while executing
"addforce $atm1 { $f(1) $f(2) $f(3) }"
    (procedure "calcforces" line 68)
    invoked from within
"calcforces"

Charm++ fatal error:
FATAL ERROR: force not a vector
    while executing
"addforce $atm1 { $f(1) $f(2) $f(3) }"
    (procedure "calcforces" line 68)
    invoked from within
"calcforces"

TCL: DL = 10.0
TCL: Force = 4.0 0.0 0.0
TCL: force not a vector
FATAL ERROR: force not a vector
    while executing
"addforce $atm1 { $f(1) $f(2) $f(3) }"
    (procedure "calcforces" line 68)
    invoked from within
"calcforces"

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:18:43 CST