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.

Click on the labels of the actions for more information on what each action computes
tested on2.9
tested onmaster
e: 
ENERGY
Calculate the total potential energy of the simulation box. More details
PRINT
Print quantities to a file. More details
ARG
the input for this action is the scalar output from one or more other actions
=e
FILE
the name of the file on which to output these quantities
=colvar

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:

  1. The energies that were obtained from the MD code, $x_{md}$.
  2. The energies that were obtained from PLUMED, $x_{pl}$.
  3. The tolerances that were used when comparing these quantities, $\delta$.
  4. 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
-683.679786 -683.679786 0.001 0.0
-682.897304 -682.897304 0.001 0.0
-681.55774 -681.55774 0.001 0.0
-679.625607 -679.625607 0.001 0.0
-677.014785 -677.014785 0.001 0.0
-673.67631 -673.67631 0.001 0.0
-669.552958 -669.552958 0.001 0.0
-664.48003 -664.48003 0.001 0.0
-658.422693 -658.422693 0.001 0.0
-651.366167 -651.366167 0.001 0.0
-643.390343 -643.390343 0.001 0.0
-634.640749 -634.640749 0.001 0.0
-625.352842 -625.352842 0.001 0.0
-616.122687 -616.122687 0.001 0.0
-607.388973 -607.388973 0.001 0.0
-599.69528 -599.69528 0.001 0.0
-593.538867 -593.538867 0.001 0.0
-588.971055 -588.971055 0.001 0.0
-586.214627 -586.214627 0.001 0.0
-585.065708 -585.065708 0.001 0.0