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
0.146553 0.146553 0.005 0.0
0.146878 0.146878 0.005 0.0
0.147201 0.147201 0.005 0.0
0.147521 0.147521 0.005 0.0
0.147836 0.147836 0.005 0.0
0.148145 0.148145 0.005 0.0
0.148447 0.148448 0.005 0.020000000000020002
0.148741 0.148742 0.005 0.020000000000020002
0.149026 0.149028 0.005 0.040000000000040004
0.149301 0.149304 0.005 0.060000000000060005
0.149565 0.149569 0.005 0.08000000000008001
0.149817 0.149822 0.005 0.10000000000010001
0.150057 0.150062 0.005 0.10000000000010001
0.150282 0.15029 0.005 0.16000000000016001
0.150494 0.150503 0.005 0.18000000000018002
0.150691 0.150702 0.005 0.22000000000022002
0.150873 0.150887 0.005 0.2799999999997249
0.15104 0.151055 0.005 0.2999999999997449
0.15119 0.151208 0.005 0.36000000000036003
0.151325 0.151346 0.005 0.42000000000042004