zdens calculates the distribution of the centres-of-mass (averaged over species) of all molecules in the system as a function of z-coordinate.

NOTE: zdens will not work correctly if the axes are not orthogonal.

Related programs:

  • To calculate radial distribution functions, see rdf.

Basic Usage

zdens <HISTORYfile> <OUTPUTfile> <base Z>


  • <HISTORYfile> is the name of the DL_POLY HISTORY file
  • <OUTPUTfile> is the name of the DL_POLY OUTPUT file
  • <base Z> is the z-coordinate to use as the 'zero' point for the distribution (e.g. it could be the location of a surface, or just zero to get the distribution relative to the box itself)


-bin width

Specify the histogram bin width to use in the calculation (default = 0.1).

-comatom sp i

Instead of the centre-of-mass, use the specifed atom index i as the reference point for species index sp. The atom indices are local atom indices for the species in question (i.e. range from 1 to the number of atoms in the molecule).

-discard n

Discard n frames at the start of the trajectory.

-frames n

Stop calculating after processing n frames.

-header file

Read in trajectory header from the specified DL_POLY HIStory file. Useful when the desired target frames are present in a restarted (and not appended) HIStory file.

-symm centreZ

Symmetrise the resulting distribution about the supplied centreZ coordinate.


Distribution functions are normalised to frame count alone.


Given an input HISTORY file results.HISu, then output files are as follows: results.zdnNN : z-density distribution for species NN