This keyword is used to compute and output space and time averaged quantities. The results are written to the compute.out output file.


It is used in the following way:

compute <grouping_method> <sample_interval> <output_interval> {<quantity>}

The first parameter grouping_method refers to the grouping method defined in the simulation model file. This parameter should be an integer and a number \(m\) means the \(m\)-th grouping method (we count from 0) in the simulation model file.

The second parameter sample_interval means sampling the quantities every so many time steps.

The third parameter output_interval means averaging over so many sampled data before giving one output.

Starting from the fourth parameter, one can list the quantities to be computed.

The allowed names for the quantities are:

  • temperature, which is the temperature

  • potential, which is the potential energy

  • force, which is the force vector

  • virial, which is the diagonal part of the virial

  • jp, which is the potential part of the heat current vector

  • jk, which is the kinetic part of the heat current vector

One can write one or more (distinct) names in any order.


For example:

compute 0 100 10 temperature

means using the 0-th grouping method defined in the simulation model file, sampling temperature every 100 time steps and averaging over 10 data points before writing to file. That is, there is only one output every \(100 \times 10=1000\) time steps.