MOVINGRESTRAINT
This is part of the bias module

Add a time-dependent, harmonic restraint on one or more variables.

This form of bias can be used to performed steered MD [46] and Jarzynski sampling [61].

The harmonic restraint on your system is given by:

\[ V(\vec{s},t) = \frac{1}{2} \kappa(t) ( \vec{s} - \vec{s}_0(t) )^2 \]

The time dependence of \(\kappa\) and \(\vec{s}_0\) are specified by a list of STEP, KAPPA and AT keywords. These keywords tell plumed what values \(\kappa\) and \(\vec{s}_0\) should have at the time specified by the corresponding STEP keyword. In between these times the values of \(\kappa\) and \(\vec{s}_0\) are linearly interpolated.

Additional material and examples can be also found in the tutorial belfast-5

Examples

The following input is dragging the distance between atoms 2 and 4 from 1 to 2 in the first 1000 steps, then back in the next 1000 steps. In the following 500 steps the restraint is progressively switched off.

Click on the labels of the actions for more information on what each action computes
tested on master
d: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=2,4 MOVINGRESTRAINT ...
ARG
compulsory keyword the labels of the scalars on which the bias will act
=d
STEP0
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=0
AT0
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=1.0
KAPPA0
compulsory keyword KAPPAx is equal to the value of the force constants at time STEPx.
=100.0
STEP1
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=1000
AT1
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=2.0
STEP2
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=2000
AT2
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=1.0
STEP3
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=2500
KAPPA3
compulsory keyword KAPPAx is equal to the value of the force constants at time STEPx.
=0.0 ...

The following input is progressively building restraints distances between atoms 1 and 5 and between atoms 2 and 4 in the first 1000 steps. Afterwards, the restraint is kept static.

Click on the labels of the actions for more information on what each action computes
tested on master
d1: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=1,5 d2: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=2,4 MOVINGRESTRAINT ...
ARG
compulsory keyword the labels of the scalars on which the bias will act
=d1,d2
STEP0
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=0
AT0
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=1.0,1.5
KAPPA0
compulsory keyword KAPPAx is equal to the value of the force constants at time STEPx.
=0.0,0.0
STEP1
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=1000
AT1
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=1.0,1.5
KAPPA1
compulsory keyword KAPPAx is equal to the value of the force constants at time STEPx.
=1.0,1.0 ...

The following input is progressively bringing atoms 1 and 2 close to each other with an upper wall

Click on the labels of the actions for more information on what each action computes
tested on master
d1: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=1,2 MOVINGRESTRAINT ...
ARG
compulsory keyword the labels of the scalars on which the bias will act
=d1
VERSE
compulsory keyword ( default=B ) Tells plumed whether the restraint is only acting for CV larger (U) or smaller (L) than the restraint or whether it is acting on both sides (B)
=U
STEP0
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=0
AT0
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=1.0
KAPPA0
compulsory keyword KAPPAx is equal to the value of the force constants at time STEPx.
=10.0
STEP1
compulsory keyword This keyword appears multiple times as STEPx with x=0,1,2,...,n.
=1000
AT1
compulsory keyword ATx is equal to the position of the restraint at time STEPx.
=0.0 ...

By default the Action is issuing some values which are the work on each degree of freedom, the center of the harmonic potential, the total bias deposited

(See also DISTANCE).

Attention
Work is not computed properly when KAPPA is time dependent.
Glossary of keywords and components
Description of components

By default this Action calculates the following quantities. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity Description
bias the instantaneous value of the bias potential
work the total work performed changing this restraint
force2 the instantaneous value of the squared force due to this bias potential
_cntr one or multiple instances of this quantity can be referenced elsewhere in the input file. these quantities will named with the arguments of the bias followed by the character string _cntr. These quantities give the instantaneous position of the center of the harmonic potential.
_work one or multiple instances of this quantity can be referenced elsewhere in the input file. These quantities will named with the arguments of the bias followed by the character string _work. These quantities tell the user how much work has been done by the potential in dragging the system along the various colvar axis.
_kappa one or multiple instances of this quantity can be referenced elsewhere in the input file. These quantities will named with the arguments of the bias followed by the character string _kappa. These quantities tell the user the time dependent value of kappa.
Compulsory keywords
ARG the labels of the scalars on which the bias will act
VERSE ( default=B ) Tells plumed whether the restraint is only acting for CV larger (U) or smaller (L) than the restraint or whether it is acting on both sides (B)
STEP This keyword appears multiple times as STEPx with x=0,1,2,...,n. Each value given represents the MD step at which the restraint parameters take the values KAPPAx and ATx.. You can use multiple instances of this keyword i.e. STEP1, STEP2, STEP3...
AT ATx is equal to the position of the restraint at time STEPx. For intermediate times this parameter is linearly interpolated. If no ATx is specified for STEPx then the values of AT are kept constant during the interval of time between STEP(x-1) and STEPx.. You can use multiple instances of this keyword i.e. AT1, AT2, AT3...
KAPPA KAPPAx is equal to the value of the force constants at time STEPx. For intermediate times this parameter is linearly interpolated. If no KAPPAx is specified for STEPx then the values of KAPPAx are kept constant during the interval of time between STEP(x-1) and STEPx.. You can use multiple instances of this keyword i.e. KAPPA1, KAPPA2, KAPPA3...
Options
NUMERICAL_DERIVATIVES

( default=off ) calculate the derivatives for these quantities numerically