Re: addforce

From: Marc Q. Ma (qma_at_oak.njit.edu)
Date: Tue Apr 19 2005 - 11:17:20 CDT

Hi,

Try the following:

lappend f1 $f(1) $f(2) $f(3)
addforce $atm1 $f1

Also -- here is another message that should be useful too:

http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/1360.html

Marc
On Apr 19, 2005, at 10:38 AM, Leandro Martínez wrote:

>
>
> 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 - 15:39:21 CST