# Re: What does "outputSystemForce" output?

From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Wed Jun 05 2013 - 16:49:20 CDT

If you introduced a harmonic restraint, distance*forceConstant is equal to
the force that is applied by you to the system, aka the "applied force". If
you want to measure the force on your variable from all the atoms in the
system, that is called the "system" force: it does not contain the applied
force, so don't expect it to change with the force constant.

The equation you linked comes from an article (Ciccotti et al), which you
could always check out for more details. If the article is also unclear, I
am sure that the first author would be delighted to hear and very much open
to provide further explanations.

The reason why the first system force is zero is a subtle technical one.
Due to the design of NAMD, collective variables and their derived
quantities are calculated before all the atom-atom forces are
completely calculated.
So the system force is the one from the previous integration step, which
doesn't exist at time step 0. If you do a short test with
colvarsTrajFrequency = 1, you'll see that starting from step 1 the data is
complete.

Cheers
Giacomo

On Wed, Jun 5, 2013 at 5:28 PM, Ivan Mikhaylov <ivan.mikhaylov_at_gmail.com>wrote:

> I defined a colvar "distance" and "forceConstant 10.0" asking for
> "oneSiteSystemForce" printing.
> I have an output in *.colvars.traj as follows:
>
> # step 1st-colvar fs_1st-colvar
> 0 2.70639531217785e+00 0.00000000000000e+00
> 1000 2.76803828316001e+00 2.49728670452675e+00
> .... ........ ...............
> 7000 3.14579942428557e+00 -3.41836799520439e+01
>
> As you see, the very first force is zero and there are positive and
> negative values in the third column for the forces.
>
> Equation (50) in section 10.3.1: