Radial distribution Analysis
Introduction
The radial distribution function (RDF) is one possible quantity to validate deposited morphologies.
The RDF, or pair correlation function, in a system of molecules describes how the density changes as a function of distance from a reference molecule in the centre.
The first peak of this function determines the radius, r, of the first solvation shell of the molecule, as illustrated schematically below.

Command line usage
RDF is computed via the QuantumPatchAnalysis module. For its usage, please export the NANOMATCH and NANOVER path variables and source the QP config
source $NANOMATCH/$NANOVER/configs/quantumpatch.config
In the folder containing your deposited morphology (usually named structure.cml) run
python $NANOMATCH/$NANOVER/QuantumPatch/QuantumPatchAnalysis.py
In the first run, this will generate a settings file for QP Analysis, named analysis_settings.yml. Open the file and adapt the following settings:
- (if needed) structure: Adapt to the name of your morphology file. We recommend to use structure.cml, not structurePBC.cml.
- RDF:
- enabled: true - enables RDF analysis
Once the settings are adapted, rerun QuantumPatchAnalysis.py as above. This will then automatically use the modified analysis_settings.yml file. This will plot a RDFs for the material or for each material combination, if it is not a pristine layer. The figure below shows the RDF for CBP, the label belongs to the molecular hash, which is required to determine RDFs of mixed morphologies (1c8f_1c8f for pristine CBP). The first peak of the RDF and the averaged number of neighboring molecules in this area will be printed to the screen while running QP Analysis. For example in a pristine CBP layer, the peak appears at 4.921 A and one molecule has on average 22 neighbours in this area.

The results of the search are