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.
dd: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2 RESTRAINTAdds harmonic and/or linear restraints on one or more variables. More details ARGthe values the harmonic restraint acts upon=dd KAPPA specifies that the restraint is harmonic and what the values of the force constants on each of the variables are=2000 ATthe position of the restraint=0.6 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=dd FILEthe 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:
dd: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=dd FILEthe name of the file on which to output these quantities=mdcode_restraint
Trajectories
-
Input and output files for the calculation where the restraint is applied by the MD code available in this zip archive
-
Input and output files for the calculation where the restraint is applied by PLUMED are available in this [zip archive](forces2_master.zip
Results
| Original | 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 |
The table below includes some of the results from the calculation. The columns contain:
- The time series of distance values that were obtained when the restraint was applied by the MD code, $x_{md}$.
- The time series of distance values that were obtained when the restraint was applied by PLUMED, $x_{pl}$.
- The tolerances that were used when comparing these quantities, $\delta$.
- 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.
Graphical representation (beta)
A visualization of the table above:
