extracting force on a single atom

From: Ben Adams (benny.adams1993_at_gmail.com)
Date: Wed Aug 30 2017 - 19:18:49 CDT

Dear NAMD users,

I've been looking everywhere to find a way to extract forces on a single
atom. It seems the best way is to use "tclforces". Here is that part of my
NAMD configuration file:

tclForces on
tclForcesScript {
  set nter [addgroup {3}]
  set cter [addgroup {4}]
  proc calcforces {} {
    global nter cter
    loadcoords coor
    loadforces forces
    print nter=$forces($nter)
    print nter=$coor($nter)


Unfortunately it doesn't recognize "loadforces" and I get the following

FATAL ERROR: can't read "forces(g1)": no such variable
    while executing
"print nter=$forces($nter)"
    (procedure "calcforces" line 5)

I also tried "$forces(4)" and got the same error.
I search through mailing list. Such a problem is being reported several
times but there are no answers to them.
Can anybody help me with that?
Is there any other way beside "dcdforces" (which outputs all the atoms
together) to get forces for a single atom?



This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:32 CST