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 |
|---|---|---|---|
| 1.1719 | 1.171875 | 0.001 | 2.4999999999941735 |
| 1.1561 | 1.156143 | 0.001 | 4.300000000001525 |
| 1.1437 | 1.143706 | 0.001 | 0.5999999999950489 |
| 1.135 | 1.134986 | 0.001 | 1.399999999995849 |
| 1.1305 | 1.130495 | 0.001 | 0.5000000000032756 |
| 1.1304 | 1.13041 | 0.001 | 0.9999999999843467 |
| 1.1339 | 1.133864 | 0.001 | 3.599999999992498 |
| 1.1416 | 1.141563 | 0.001 | 3.6999999999842714 |
| 1.1525 | 1.15246 | 0.001 | 4.000000000004 |
| 1.1635 | 1.163481 | 0.001 | 1.8999999999991246 |
| 1.1754 | 1.175372 | 0.001 | 2.799999999991698 |
| 1.1863 | 1.186334 | 0.001 | 3.4000000000089514 |
| 1.1962 | 1.196219 | 0.001 | 1.8999999999991246 |
| 1.2031 | 1.203099 | 0.001 | 0.1000000000139778 |
| 1.2067 | 1.206711 | 0.001 | 1.0999999999983245 |
| 1.2072 | 1.207162 | 0.001 | 3.7999999999982492 |
| 1.2037 | 1.203659 | 0.001 | 4.099999999995774 |
| 1.1968 | 1.196849 | 0.001 | 4.899999999996574 |
| 1.1879 | 1.187897 | 0.001 | 0.29999999999752447 |
| 1.1774 | 1.177406 | 0.001 | 0.5999999999950489 |
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:
