Energy is passed correctly
It is common practise to use the potential energy as a collective energy. Some MD codes thus pass the potential energy to PLUMED. To check that this quantity has been passed correctly we can output the passed energy from PLUMED using the following input.
e:ENERGYCalculate the total potential energy 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=colvarthe name of the file on which to output these quantities
We can then also output the energy from the MD code and check this matches the value output by PLUMED. We run a short trajectory to test that the energy is passed correctly.
Trajectory
Input and output files for the test calculation are available in this zip archive
Results
The table below includes some of the results from the calculation. The columns contain:
- The energies that were obtained from the MD code, $x_{md}$.
- The energies that were obtained from 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.
MD code output | PLUMED output | Tolerance | % Difference |
---|---|---|---|
-18174.685547 | -18174.685547 | 0.001 | 0.0 |
-18171.685547 | -18171.685547 | 0.001 | 0.0 |
-18195.621094 | -18195.621094 | 0.001 | 0.0 |
-18171.392578 | -18171.392578 | 0.001 | 0.0 |
-18162.59375 | -18162.59375 | 0.001 | 0.0 |
-18148.865234 | -18148.865234 | 0.001 | 0.0 |
-18135.007812 | -18135.007812 | 0.001 | 0.0 |
-18126.544922 | -18126.544922 | 0.001 | 0.0 |
-18126.539062 | -18126.539062 | 0.001 | 0.0 |
-18134.189453 | -18134.189453 | 0.001 | 0.0 |
-18145.203125 | -18145.203125 | 0.001 | 0.0 |
-18154.601562 | -18154.601562 | 0.001 | 0.0 |
-18160.289062 | -18160.289062 | 0.001 | 0.0 |
-18164.990234 | -18164.990234 | 0.001 | 0.0 |
-18174.554688 | -18174.554688 | 0.001 | 0.0 |
-18192.367188 | -18192.367188 | 0.001 | 0.0 |
-18215.488281 | -18215.488281 | 0.001 | 0.0 |
-18235.001953 | -18235.001953 | 0.001 | 0.0 |
-18242.037109 | -18242.037109 | 0.001 | 0.0 |
-18233.199219 | -18233.199219 | 0.001 | 0.0 |