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:
eENERGYCalculate the total potential energy of the simulation box. More details v : VOLUMECalculate the volume the simulation box. More details PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=e,v FILEthe name of the file on which to output these quantities=energy1:
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:
eENERGYCalculate the total potential energy of the simulation box. More details v : VOLUMECalculate the volume the simulation box. More details # slope is such that PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=e FILEthe name of the file on which to output these quantities=energy2 # slope should be (alpha-1)=0.21 RESTRAINTAdds harmonic and/or linear restraints on one or more variables. More details ATthe position of the restraint=0.0 ARGthe values the harmonic restraint acts upon=e SLOPE specifies that the restraint is linear and what the values of the force constants on each of the variables are=0.21:
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 |
---|---|---|---|
-26662.0232 20.5064 | -26662.0232 20.5064 | 0.0000 0.0000 | 0.0000 0.0000 |
-26632.8447 20.5065 | -32231.8696 20.5065 | 4.2609 0.0000 | 131404.2543 0.0000 |
-26571.8411 20.5067 | -33340.5337 20.5067 | 17.1626 0.0000 | 39438.6477 0.0000 |
-26484.6481 20.5070 | -33486.1602 20.5070 | 38.7568 0.0001 | 18065.2356 0.0000 |
-26378.6379 20.5075 | -33410.7315 20.5075 | 69.0190 0.0002 | 10188.6330 0.0000 |
-26263.1007 20.5081 | -33279.3543 20.5081 | 107.6310 0.0002 | 6518.8048 0.0000 |
-26147.5255 20.5088 | -33136.1899 20.5088 | 153.6553 0.0003 | 4548.2744 0.0000 |
-26041.4051 20.5095 | -33000.0050 20.5095 | 206.2018 0.0004 | 3374.6553 0.0000 |
-25953.4724 20.5103 | -32883.4734 20.5103 | 263.0785 0.0005 | 2634.1955 0.0000 |
-25889.9417 20.5112 | -32795.4710 20.5112 | 321.9731 0.0006 | 2144.7532 0.0000 |
-25854.7947 20.5121 | -32741.8437 20.5121 | 379.6169 0.0006 | 1814.2101 0.0000 |
-25849.5319 20.5129 | -32725.3191 20.5129 | 433.2043 0.0007 | 1587.1927 0.0000 |
-25872.5352 20.5138 | -32744.8523 20.5138 | 479.5423 0.0007 | 1433.0993 0.0000 |
-25918.8983 20.5145 | -32795.3170 20.5145 | 514.9060 0.0006 | 1335.4707 0.0000 |
-25982.6263 20.5152 | -32869.6426 20.5152 | 537.2437 0.0006 | 1281.9167 0.0000 |
-26055.6036 20.5158 | -32958.2285 20.5158 | 544.7540 0.0005 | 1267.1087 0.0000 |
-26129.2380 20.5162 | -33050.4658 20.5162 | 536.8584 0.0003 | 1289.2091 0.0000 |
-26195.4672 20.5166 | -33136.0650 20.5166 | 514.7495 0.0002 | 1348.3448 0.0000 |
-26247.4341 20.5167 | -33206.0077 20.5167 | 480.3905 0.0001 | 1448.5245 0.0000 |
-26279.6502 20.5167 | -33252.9118 20.5167 | 437.2443 0.0004 | 1594.8204 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: