# smd force vs time

From: Falgun Shah (fhshah_at_olemiss.edu)
Date: Sun Feb 22 2009 - 13:31:07 CST

Dear Namd Users

I am running smd simulation using constant velocity pulling. I have query
regarding the plot of time vs force using ft.tcl script. In Namd, tutorial
this is written:

"In order to obtain the force in the direction of pulling *you need to
calculate* [image: $\vec{f}\cdot\vec{n}$], where [image: $\vec{n}$] is the
normalized direction of pulling (in our example it was 0.443, 0.398, 0.803).

*However the normalized direction of pulling is calulated as follow in
section 3.1.15*

set smdpos [lindex [$smdatom get {x y z}] 0] set fixedpos [lindex [$fixedatom get {x y z}] 0] vecnorm [vecsub $smdpos$fixedpos]

This gives you three numbers that are the [image: $x$], [image: $y$],
and [image:
$z$]- components of the *normalized* direction between the fixed and the SMD
atom! Keep these [image: $n_x$], [image: $n_y$] and [image: $n_z$] saved for
the next section.

[image: $n_x =$] [image: $n_y =$] [image: $n_z =$]

In the provided example (look at Figs.
18<http://www.ks.uiuc.edu/Training/Tutorials/namd/namd-tutorial-unix-html/node17.html#fig:tut_unit03_002>and
19<http://www.ks.uiuc.edu/Training/Tutorials/namd/namd-tutorial-unix-html/node17.html#fig:tut_unit03_003>),
the result is:

[image: $(38.843,39.309,33.494)-(26.241, 24.928, 3.279)=(12.602,14.381,30.215)$]

[image: $\sqrt{12.602^2+14.381^2+30.215^2}=35.757$]

[image: $n_x = \frac{12.602}{35.757} = 0.352$] [image: $n_y = \frac{14.381}{35.757} = 0.402$] [image: $n_z = \frac{30.215}{35.757} = 0.845$]

(nx, ny, nz)=(0.352, 0.402, 0.845). Why these two values are different? and
one used in ft. tcl file was (nx, ny, nz)= (0.443, 0.398, 0.803)

Even i checked the namd tutorial files and if i enter the direction 0.352,
0.402 and 0.845 and run ft. tcl., the plots which i got and one using ft.tcl
in the example output file looks different. So when we run ft. tcl, it asks
for n_x, n_y and n_z. At this time, do we just need to provide the pulling
direction (0.352, 0.402, 0.845 as calculated in section 3.1.15 of namd
tutorial) or do we need to multiply the direction with some terms (force
components) and then feed to ft.tcl file. In the description of ft. tcl
script, it is shown that the script does write f dot n to the output file.
That means we do not need to multiply it with anything. Then why these two
values shown in the examples are different [(0.352, 0.402, 0.845 section
3.1.15) and (0.443, 0.398, 0.803 section 3.4.5)]. i think i am missing
--