This keyword is used to compute the radial distribution function (RDF) for all atoms or pairs of species. It works for both classical MD and PIMD. The results will be written to the rdf.out file.


This keyword is used as follows:

compute_rdf <cutoff> <num_bins> <interval> [atom <i1> <i2> atom <i3> <i4> ...]

This means that the RDF calculations will be performed every interval steps, with num_bins data points evenly distributed from 0 to cutoff (in units of Ångstrom) in terms of the distance between atom pairs.

Without the optional parameters, only the total RDF will be calculated.

To additionally calculate the partial RDF for a pair of species, one can specify the types of the two species after the word “atom”. The types 0, 1, 2, … correspond to the species in the potential file in order. Currently, one can specify at most 6 pairs.


compute_rdf 8.0 400 1000 # total RDF every 1000 MD steps with 400 data up to 8 Angstrom compute_rdf 8.0 400 1000 atom 0 0 atom 1 1 atom 0 1 # additionally calculate 3 partial RDFs