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 |
---|---|---|---|
-18174.6855 11.6346 | -18174.6855 11.6346 | 0.0000 0.0000 | 0.0000 0.0000 |
-18171.6855 11.6346 | -18193.1699 11.6346 | 6.8730 0.0000 | 312.5888 0.0000 |
-18171.8730 11.6346 | -18237.7383 11.6346 | 12.5449 0.0000 | 525.0350 0.0000 |
-18164.5801 11.6346 | -18286.6230 11.6346 | 15.6191 0.0000 | 781.3680 0.0000 |
-18149.5156 11.6346 | -18326.4746 11.6346 | 15.8555 0.0000 | 1116.0754 0.0000 |
-18129.7988 11.6346 | -18349.6875 11.6346 | 14.5020 0.0000 | 1516.2694 0.0000 |
-18111.5625 11.6346 | -18356.3828 11.6346 | 14.1484 0.0000 | 1730.3699 0.0000 |
-18100.7754 11.6346 | -18352.7344 11.6346 | 16.5469 0.0000 | 1522.6983 0.0000 |
-18100.4961 11.6346 | -18346.7715 11.6346 | 21.6289 0.0000 | 1138.6401 0.0000 |
-18109.1758 11.6346 | -18344.1562 11.6346 | 27.1602 0.0000 | 865.1661 0.0000 |
-18121.7383 11.6346 | -18346.2617 11.6346 | 30.2383 0.0000 | 742.5139 0.0000 |
-18132.4297 11.6346 | -18351.3984 11.6346 | 29.2969 0.0000 | 747.4133 0.0000 |
-18138.7227 11.6346 | -18358.0176 11.6346 | 26.0195 0.0000 | 842.8089 0.0000 |
-18143.4570 11.6346 | -18366.9297 11.6346 | 25.0879 0.0000 | 890.7591 0.0000 |
-18152.6797 11.6346 | -18380.9277 11.6346 | 30.8164 0.0000 | 740.6705 0.0000 |
-18170.3613 11.6346 | -18401.0020 11.6346 | 42.6113 0.0000 | 541.2660 0.0000 |
-18193.5430 11.6346 | -18423.1738 11.6346 | 53.3086 0.0000 | 430.7577 0.0000 |
-18213.3223 11.6346 | -18439.3379 11.6346 | 53.7969 0.0000 | 420.1278 0.0000 |
-18220.6445 11.6346 | -18442.2598 11.6346 | 39.8418 0.0000 | 556.2381 0.0000 |
-18212.0410 11.6346 | -18430.6621 11.6346 | 15.5137 0.0000 | 1409.2156 0.0000 |