Checking PLUMED can add a restraint

To check that the forces are being correctly passed from PLUMED to the MD code we test that the result from a PLUMED calculation where the following plumed input is used produces results that are equivalent to the result that is obtained when the restraint is applied within the MD code.

Click on the labels of the actions for more information on what each action computes
tested on2.9
tested onmaster
dd: 
DISTANCE
Calculate the distance between a pair of atoms. More details
ATOMS
the pair of atom that we are calculating the distance between
=1,2
RESTRAINT
Adds harmonic and/or linear restraints on one or more variables. More details
ARG
the arguments on which the bias is acting
=dd
KAPPA
specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
=2000
AT
the position of the restraint
=0.6
PRINT
Print quantities to a file. More details
ARG
the input for this action is the scalar output from one or more other actions
=dd
FILE
the name of the file on which to output these quantities
=plumed_restraint

To check that the two ways of applying the restraint are equivalent we use the following PLUMED input for the calculation where the MD code applies the restraint:

Click on the labels of the actions for more information on what each action computes
tested on2.9
tested onmaster
dd: 
DISTANCE
Calculate the distance between a pair of atoms. More details
ATOMS
the pair of atom that we are calculating the distance between
=1,2
PRINT
Print quantities to a file. More details
ARG
the input for this action is the scalar output from one or more other actions
=dd
FILE
the name of the file on which to output these quantities
=mdcode_restraint

Trajectories

  1. Input and output files for the calculation where the restraint is applied by the MD code available in this zip archive
  2. Input and output files for the calculation where the restraint is applied by PLUMED are available in this zip archive

Results

The table below includes some of the results from the calculation. The columns contain:

  1. The time series of distance values that were obtained when the restraint was applied by the MD code, $x_{md}$.
  2. The time series of distance values that were obtained when the restraint was applied by PLUMED, $x_{pl}$.
  3. The tolerances that were used when comparing these quantities, $\delta$.
  4. The values of $100\frac{\vert x_{md} - x_{pl}\vert }{ \delta}$.

If the PLUMED interface is working correctly the first two sets of numbers should be identical and the final column should be filled with zeros.

Original result Result with PLUMED Effect of peturbation % Difference
1.1976 1.197586 0.001 1.399999999995849
1.2069 1.206942 0.001 4.199999999987547
1.2143 1.21433 0.001 2.999999999997449
1.2203 1.220255 0.001 4.4999999999850715
1.2253 1.225348 0.001 4.8000000000048
1.2275 1.227451 0.001 4.899999999996574
1.2262 1.226235 0.001 3.5000000000007248
1.2215 1.221467 0.001 3.2999999999949736
1.214 1.213982 0.001 1.8000000000073513
1.2042 1.204175 0.001 2.4999999999941735
1.1942 1.194159 0.001 4.099999999995774
1.1836 1.183602 0.001 0.20000000000575113
1.1745 1.174533 0.001 3.2999999999949736
1.1677 1.167743 0.001 4.300000000001525
1.1649 1.16488 0.001 2.0000000000131024
1.1652 1.165186 0.001 1.399999999995849
1.1686 1.16862 0.001 1.999999999990898
1.1762 1.176242 0.001 4.2000000000097515
1.186 1.185993 0.001 0.6999999999868223
1.1976 1.197622 0.001 2.199999999996649