force units conversion

From: Olya Kravchenko (ovkrav_at_gmail.com)
Date: Thu Mar 24 2016 - 14:15:05 CDT

Hi all,

I am running a simulation but not getting result that I expect, I
wonder if I am making a mistake with converting the numbers. I'd
appreciate if someone could reassure me that the following conversion
is correct.

I would like to calculate force that I apply to argon molecules in
kcal/mol/A. I set linaccel to be {0.0 0.0 5 } Here is my conversion
(according to namd forces tutorial):

F = m*a = 39.948 amu * (5 / 418.68) kcal/mol/A/amu = 0.4777 kcal/mol/A

Is this correct?

Here is my force script, just in case:

set numatoms 200

set atoms {}
for { set i 1 } { $i <= $numatoms } { incr i } {
    lappend atoms $i
}
foreach atom $atoms {
    addatom $atom
}

set f { 0.0 0.0 5 }
set linaccel_namd [vecscale [expr 1.0/418.68] $f]

proc calcforces { } {
    global atom atoms numatoms linaccel_namd f
    loadcoords coords
    loadmasses masses

    foreach atom $atoms {
        foreach {x y z} $coords($atom) {;}
        if { $z <= 5 && $z >= 55 } {
            set force [vecscale $masses($atom) $linaccel_namd]
            addforce $atom $force
        }
    }
}

This archive was generated by hypermail 2.1.6 : Tue Dec 27 2016 - 23:21:54 CST