codf acts in a similar manner to cdf, calculating cylindrical distribution functions of molecules. However, instead of the normalised 2D equivalent to the rdf, codf gives information on the orientation of species as a function of distance from the defining vector, given defining sets of axes on the individual species.

A vector describing the direction along which the cylinder lays is input, along with a point on which this vector lays. For each molecule the minimum distance (i.e. the perpendicular distance) between its centre-of-mass and the defining vector is calculated and the dot product between the perpendicular vector and each axis of the molecule is summed into distance bins. The resulting output is the average of the dot product of each molecular axis as a function of distance from the defining vector, along with the 2D maps of angle vs distance for each of the three angles formed between the perpendicular vector and the molecule axes.

Related programs:

  • To calculate standard cylindrical distribution functions, see cdf.

Basic Usage

codf <HISTORYfile> <OUTPUTfile> <ox> <oy> <oz> <vx> <vy> <vz> <targetsp>


  • <HISTORYfile> is the name of the DL_POLY HISTORY file
  • <OUTPUTfile> is the name of the DL_POLY OUTPUT file
  • <ox> <oy> <oz> is a point on which the defining vector lays
  • <vx> <vy> <vz> is the defining vector of the cylindrical object / pore
  • <targetsp> is a comma-separated list of indices specifying which species to consider


-anglebin width

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

-axis sp x1 x2 y1 y2

Define the axis system for species index sp from the four supplied atom indices. Axes must be defined for each + <targetsp> listed. See the pdens manual for more information on defining axes.

-bin width

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

-compair sp i j

Instead of the centre-of-mass, use the average coordinates of atom indices i and j 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.


Given an input HISTORY file results.HISu, then output files are as follows: results.codfNN : Cylindrical orientation distribution function for species NN about the defining vector (columns 2-4 are standard averages, columns 5-7 are averages of the absolute dot products, column 8 is the number of molecules used in the average) results.codfNNAA : Distance / angle map for axis AA of species NN