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 labels of the values that you would like to print to the fileFILE=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 labels of the values that you would like to print to the fileFILE=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 values the harmonic restraint acts uponSLOPE=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
Original | With PLUMED | Effect of peturbation | % Difference |
---|---|---|---|
-18174.8223 11.6346 | -18174.8223 11.6346 | 0.0000 0.0000 | 0.0000 0.0000 |
-18171.8203 11.6346 | -18193.2891 11.6346 | 6.8730 0.0000 | 312.3615 0.0000 |
-18174.7305 11.6346 | -18239.5723 11.6346 | 15.3047 0.0000 | 423.6728 0.0000 |
-18173.2930 11.6346 | -18292.3418 11.6346 | 24.3203 0.0000 | 489.5037 0.0000 |
-18165.6504 11.6346 | -18337.3711 11.6346 | 32.0645 0.0000 | 535.5485 0.0000 |
-18153.2988 11.6346 | -18365.6992 11.6346 | 38.1602 0.0000 | 556.6025 0.0000 |
-18140.8145 11.6346 | -18376.4609 11.6346 | 43.6523 0.0000 | 539.8255 0.0000 |
-18133.3965 11.6346 | -18375.1973 11.6346 | 49.4883 0.0000 | 488.6021 0.0000 |
-18134.0840 11.6346 | -18369.9043 11.6346 | 55.5527 0.0000 | 424.4981 0.0000 |
-18142.0938 11.6346 | -18366.7227 11.6346 | 60.4180 0.0000 | 371.7916 0.0000 |
-18153.1895 11.6346 | -18367.7227 11.6346 | 62.0312 0.0000 | 345.8470 0.0000 |
-18162.5391 11.6346 | -18371.9297 11.6346 | 59.7305 0.0000 | 350.5592 0.0000 |
-18168.1484 11.6346 | -18378.0508 11.6346 | 55.7402 0.0000 | 376.5724 0.0000 |
-18172.8867 11.6346 | -18387.0039 11.6346 | 54.8125 0.0000 | 390.6357 0.0000 |
-18182.5684 11.6346 | -18401.3262 11.6346 | 60.9824 0.0000 | 358.7227 0.0000 |
-18200.6211 11.6346 | -18421.7441 11.6346 | 73.1582 0.0000 | 302.2533 0.0000 |
-18223.8652 11.6346 | -18443.9941 11.6346 | 83.9375 0.0000 | 262.2534 0.0000 |
-18243.3535 11.6346 | -18459.9023 11.6346 | 84.1445 0.0000 | 257.3534 0.0000 |
-18250.1719 11.6346 | -18462.4023 11.6346 | 69.6680 0.0000 | 304.6313 0.0000 |
-18241.1211 11.6346 | -18450.5254 11.6346 | 44.8809 0.0000 | 466.5782 0.0000 |
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.
Graphical representation (beta)
A visualization of the table above: