Re: Colvars Harmonic Bias Force Direction

From: Jérôme Hénin (
Date: Wed Sep 02 2020 - 08:03:15 CDT

Hi Mortimer,

If x are the Cartesian coordinates of atoms, let's define a collective variable f(x).
A harmonic potential on the colvar, centered on f0 and with force constant k will be:
V(x) = 1/2*k*(f(x)-f0)^2

This is a function of x indirectly, through the function f(x). The corresponding force on atoms is the negative gradient of the potential with respect to atomic positions x:
F(x) = - dV(x) / dx = - k * (f(x)-f0) * df(x)/dx

Here df(x)/dx means the gradient of the colvar with respect to Cartesian coordinates x. That's a vector pointing in the direction in Cartesian coordinates along which f(x) increases the fastest.
The magnitude and direction of the force also depend on the magnitude and sign of (f(x)-f0), that is where the colvar is with respect to the set restraint center.

So to summarize, the biasing force will be applied in the direction that causes the maximum change in the value of the colvar.

If you use the latest VMD under Linux, you can easily visualize the gradients of any scalar colvar using the Colvars Dashboard plugin.


----- On 2 Sep 20, at 14:28, Mortimer Hemmit wrote:

> Hello,
> I am performing some steered molecular dynamics simulations. I was
> wondering how the harmonic biases worked.
> I understand how a simple colvar with a harmonic bias on the distance
> between atoms could work. I can picture it as a spring attached
> between the atoms which exerts a force that pulls each atom towards
> the other.
> However, for more complicated colvars such as radius of gyration,
> coordination number, dihedral angle, RMSD, to name a few, how exactly
> does the added potential manifest itself to restrain these quantities
> to their desired values? In which direction do the forces/springs
> point (or are there even forces at all) if I put a harmonic bias on
> these colvars?
> I have looked at the user guide and the Colvars paper, but I am still
> confused about the forces.
> If anyone could help me clear this up or point me in the right
> direction with some references, that would be greatly appreciated.
> Thank you very much,
> Mortimer

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2020 - 23:17:14 CST