All Pages
RESTRAINT

Adds harmonic and/or linear restraints on one or more variables.

Either or both of SLOPE and KAPPA must be present to specify the linear and harmonic force constants respectively. The resulting potential is given by:

\[ \sum_i \frac{k_i}{2} (x_i-a_i)^2 + m_i*(x_i-a_i) \]

.

The number of components for any vector of force constants must be equal to the number of arguments to the action.

Description of components

By default this Action calculates the following quantities. These quanties 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
force2 the instantaneous value of the squared force due to this bias potential
Compulsory keywords
ARG the input for this action is the output from one or more other actions. The particular output that you used is referenced using that action of interests label. If the label appears on its own then the value of the relevant Action is taken. If * or *.* appears the information from all arguments is taken. Some actions have multi-component outputs, each component of the output has a specific label so for instance an action labelled dist may have three componets x, y and z. To take just the x component you should use dist.x, if you wish to take all three components then use dist.*
SLOPE ( default=0.0 ) specifies that the restraint is linear and what the values of the force constants on each of the variables are
KAPPA ( default=0.0 ) specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
AT the position of the restraint
Options
NUMERICAL_DERIVATIVES

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

Examples
The following input tells plumed to restrain the distance between atoms 3 and 5 and the distance between atoms 2 and 4, at different equilibrium values, and to print the energy of the restraint
DISTANCE ATOMS=3,5 LABEL=d1
DISTANCE ATOMS=2,4 LABEL=d2
RESTRAINT ARG=d1,d2 AT=1.0,1.5 KAPPA=150.0,150.0 LABEL=restraint
PRINT ARG=restraint.bias
(See also DISTANCE and PRINT).