LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

fix rdf command

Syntax:

fix ID group-ID rdf N file Nbin itype1 jtype1 itype2 jtype2 ... 

Examples:

fix 1 all rdf 500 rdf.out 100 1 1
fix 1 fluid rdf 10000 rdf.out 100 1 1 1 2 2 1 2 2 

Description:

Compute the radial distribution function (RDF), also known as g(r), and coordination number every N steps. The RDF for each specified atom type pair is histogrammed in Nbin bins from distance 0 to Rc, where Rc = the maximum force cutoff for any pair of atom types. An atom pair only contributes to the RDF if

The latter will not be the case for bonded atoms (1-2, 1-3, 1-4 interactions within a molecular topology) if the pairwise weighting factor set by the special_bonds command is 0.0 for the 2 atoms.

The RDF statistics for each timestep are written to the specified file, as are the RDF values averaged over all timesteps.

Restrictions:

The RDF is not computed for distances longer than the force cutoff, since processors (in parallel) don't know atom coordinates for atoms further away than that distance. If you want an RDF for larger r, you'll need to post-process a dump file.

Related commands:

pair_style

Default: none