Check force on energy
It is common practise to use the potential energy as a collective energy. Some MD codes thus pass the potential energy to PLUMED and PLUMED can then apply forces on this collective variable. We test that any forces that PLUMED applies on the potential energy are correctly passed back to the MD code by doing the following test. We first run a short simulation at $T$ K with a timestep of $\tau$ ps. During the course of this simulation we monitor the potential energy using the following PLUMED input:
e:ENERGYv :Calculate the total potential energy of the simulation box. More detailsVOLUMECalculate the volume of the simulation box. More detailsPrint quantities to a file. More detailsARG=e,vthe input for this action is the scalar output from one or more other actionsFILE=energy1the name of the file on which to output these quantities
We then run a second simulation (starting from identical conditions) at a temperature of $T\alpha$ and with a timestep of $\tau/\sqrt(\alpha)$. The thermostat and barostat relaxation times are similarly divided by $\sqrt(\alpha)$. In the tests that are run on this website we set $\sqrt(\alpha)=1.1$. The PLUMED file above is used when this test is run but a different time series of energy values is recorded as the MD parameters in this second simulation are different.
If PLUMED is working correctly we should be able to recapture the time series of energy values for the first simulation by running an MD simulation with the modified parameters that were used in the second simulation and the following PLUMED input file:
e:ENERGYv :Calculate the total potential energy of the simulation box. More detailsVOLUME# slope is such thatCalculate the volume of the simulation box. More detailsPrint quantities to a file. More detailsARG=ethe input for this action is the scalar output from one or more other actionsFILE=energy2 # slope should be (alpha-1)=0.21the name of the file on which to output these quantitiesRESTRAINTAdds harmonic and/or linear restraints on one or more variables. More detailsAT=0.0the position of the restraintARG=ethe arguments on which the bias is actingSLOPE=0.21specifies that the restraint is linear and what the values of the force constants on each of the variables are
In other words, when forces are passed correctly the time series for the energies and volumes from the first and third of these calculations should be identical.
To determine if PLUMED passes this test we calculate the difference between the time series that were observed in the first and third simulations described above. We then divide this by the difference between the first and second time series.
An NPT version of this calculation is performed as well as an NVT calculation if the virial is passed to PLUMED.
Trajectories
- Input and output files for the unpeturbed calculation are available in this zip archive
-
Input and output files for the peturbed calculation are available in this zip archive
- Input and output files for the peturbed calculation in which a PLUMED restraint is used to undo the effect of the changed MD parameters are available in this zip archive
Results
The table below includes some of the results from the calculation. The columns contain:
- Time series for the energy and volume that were obtained from the simulation at $T$ K, $x_{md}$.
- Time series for the energy and volume that were obtained from the simulation at $\alpha T$ K and in which PLUMED applied a restraint on the energy, $x_{pl}$.
- The absolute value of the difference between the time series of energies and volumes that were obtained from the simulations running at $T$ K and $\alpha T$ K, $\vert x_{md}’-x_{md} \vert$. No PLUMED restraints were applied in either of these simulations.
- The values of $100\frac{\vert x_{md} - x_{pl}\vert }{ \vert x_{md}’-x_{md} \vert}$.
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 |
---|---|---|---|
-26662.0234 20.5064 | -26662.0234 20.5064 | 0.0000 0.0000 | 0.0000 0.0000 |
-26632.7826 20.5064 | -32231.8075 20.5064 | 4.2678 0.0000 | 131193.6816 0.0000 |
-26571.5454 20.5064 | -33340.2250 20.5064 | 17.0923 0.0000 | 39600.6700 0.0000 |
-26484.0634 20.5064 | -33485.5107 20.5064 | 38.6814 0.0000 | 18100.3051 0.0000 |
-26377.7586 20.5064 | -33409.7158 20.5064 | 68.9223 0.0000 | 10202.7324 0.0000 |
-26261.9987 20.5064 | -33278.0390 20.5064 | 107.5879 0.0000 | 6521.2196 0.0000 |
-26146.3689 20.5064 | -33134.7571 20.5064 | 153.7672 0.0000 | 4544.7839 0.0000 |
-26040.4820 20.5064 | -32998.7810 20.5064 | 206.2637 0.0000 | 3373.4965 0.0000 |
-25952.9781 20.5064 | -32882.7221 20.5064 | 263.4308 0.0000 | 2630.5745 0.0000 |
-25890.2908 20.5064 | -32795.6625 20.5064 | 322.5707 0.0000 | 2140.7313 0.0000 |
-25856.3626 20.5064 | -32743.4518 20.5064 | 380.6413 0.0000 | 1809.3384 0.0000 |
-25852.3711 20.5064 | -32728.4960 20.5064 | 434.4445 0.0000 | 1582.7394 0.0000 |
-25876.6242 20.5064 | -32749.6083 20.5064 | 480.8284 0.0000 | 1429.4047 0.0000 |
-25924.3896 20.5064 | -32801.8073 20.5064 | 516.2124 0.0000 | 1332.2846 0.0000 |
-25989.2247 20.5064 | -32877.6042 20.5064 | 538.4175 0.0000 | 1279.3750 0.0000 |
-26062.6225 20.5064 | -32966.9194 20.5064 | 545.3382 0.0000 | 1266.0577 0.0000 |
-26136.2191 20.5064 | -33059.2722 20.5064 | 536.6946 0.0000 | 1289.9427 0.0000 |
-26201.9890 20.5064 | -33144.4362 20.5064 | 513.8327 0.0000 | 1351.1105 0.0000 |
-26252.5291 20.5064 | -33212.8607 20.5064 | 478.2866 0.0000 | 1455.2639 0.0000 |
-26283.0563 20.5064 | -33257.7571 20.5064 | 434.0692 0.0000 | 1606.8178 0.0000 |