Pair Correlation g(r) Calculator

Estimate microscopic structure using radial distribution profiles fast. Supports 1D, 2D, and 3D systems accurately. Paste coordinates, set bins, then compute g(r) instantly now.

Calculator Inputs

Choose based on your coordinate columns.
Recommended for bulk systems.
If provided, must match lines pasted.
Either specify Δr or bins count.
Use ≤ min(L)/2 for strict periodic consistency.
Useful when units are reduced.
Accepted separators: commas, spaces, tabs, semicolons. For 2D use x y, for 1D use x.

Formula Used

The pair correlation function g(r) measures how density varies with distance. This calculator builds a histogram of pair separations and normalizes by the ideal-gas neighbor count in a shell.

  • Histogram: neighbor counts in [r, r+Δr) from all particle pairs.
  • Shell factor: dV = 4πr²Δr (3D), dA = 2πrΔr (2D), dℓ = 2Δr (1D).
  • Normalization: g(r) = counts(r) / (N · ρ · dV).
  • Periodic option: minimum-image distances reduce finite-size artifacts.

How to Use This Calculator

  1. Select the dimension that matches your data (1D/2D/3D).
  2. Enter box lengths. For periodic systems, use your cell sizes.
  3. Paste coordinates, one particle per line, using commas or spaces.
  4. Choose bin settings: either Δr or a target number of bins.
  5. Optionally set rmax. For periodic data, keep rmax ≤ min(L)/2.
  6. Press Compute g(r). Results appear above the form.
  7. Use Download CSV or Download PDF to export.

Example Data Table

Sample g(r) values (illustrative only):
r g(r) Interpretation
0.500.02Very few close neighbors due to repulsion.
1.052.30First coordination shell peak.
1.550.85Depletion after the first shell.
2.051.45Second shell ordering.
3.001.05Approaching uniform structure.
4.001.00Long-range limit, ideal-gas behavior.

Related Calculators

Boltzmann factor calculatorPartition function calculatorCanonical ensemble calculatorGrand canonical calculatorMicrocanonical entropy calculatorChemical potential calculatorInternal energy calculatorThermal wavelength calculatorMaxwell Boltzmann speedMean speed calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.