Pair distribution function ========================== Where do atoms sit relative to each other? The pair distribution function answers that with one curve, and it works even for glasses and liquids where there is no lattice to index. Real space: count your neighbors --------------------------------- The question: in this pile of atoms, are there preferred distances? Stand on any atom and look around. How far away do the neighbors sit, typically? Is there a favorite spacing, a second shell, or just randomness? Answering that for every atom at every distance is a complete description of local structure, and one line of bookkeeping writes it down: .. math:: g(r) = \frac{\rho(r)}{\rho_0} - :math:`\rho(r)`: local density at distance r. Stand on an atom, draw a thin ring at r, count atoms in it, divide by the ring's area (atoms/Ų here; atoms/ų for a 3D shell) - :math:`\rho_0 = N/V`: average density, just the atom count over the box size. This widget: 64 atoms / (10 × 10) = 0.64 per unit area. Real materials: atoms per ų - the ratio has no units: the densities cancel, so g(r) measures arrangement, not amount. :math:`g(r) = 1` means the ring is exactly as crowded as random - peaks: preferred distances (bond lengths, neighbor shells); :math:`g \approx 0` below the first peak because atoms cannot overlap .. raw:: html
Press **Count it** to watch the definition happen: a ring sweeps outward from each atom, every neighbor it crosses drops one count into the histogram at that distance, and after the last atom the raw counts are divided by ρ₀ × ring area to become g(r). Crystal: sharp peaks forever. Liquid: a few broad shells, then flat 1. Ideal gas: 1 everywhere, even at tiny r, because these are non-interacting points. Real atoms can never do that; their electron clouds repel, which is why every real material digs the g ≈ 0 hole you see below the liquid's first peak. The structure factor: pair distances written as waves ------------------------------------------------------- In an experiment the question changes, because the atoms are invisible. A diffraction pattern is made of scattered waves, so the question becomes: what do pair distances look like when all you can record is waves? What does the wave do at an atom? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before any formula: what is the interaction? The incoming wave is an oscillating field, and it shakes the atom's electrons at its own frequency, like driven pendulums. A shaken charge cannot help but radiate, so the atom re-broadcasts the wave. That is elastic scattering: nothing absorbed, nothing stored, just forced dancing that emits a new wave. Watch it happen, one atom, close up: .. raw:: html Each passing crest lifts the electron, each trough pulls it down (the bottom trace shows field in and motion out, locked in rhythm), and that wiggle is the source of the outgoing ripples. Use the two wave toggles to take the interaction apart: incoming alone is the world without the atom, scattered alone is what the atom adds, and both together is what actually exists. One honesty note: the widget exaggerates wildly. Real scattering is feeble; almost all of the wave passes through untouched, and the redirected fraction is tiny (an atom's effective target area for X-rays is about a hundred-millionth of its geometric size, which is why X-rays pass through your hand). And elastic scattering absorbs nothing: the electron borrows and re-emits in the same instant. True absorption is a separate channel that kills the photon and produces no fringes. The feebleness is a gift: it means each detected wave scattered exactly once, the hidden assumption behind every formula on this page. Electrons scatter far more strongly, which is why thick samples in electron diffraction need multiple-scattering corrections. Toggle **Dipole pattern** for the honest 3D shape: a wiggling charge radiates strongest sideways and not at all along its shake axis, the dashed figure-eight, which in 3D is a donut around the field direction. One refinement beyond X-rays: electron waves (4D-STEM) scatter forward-peaked off the atomic potential instead, and neutrons really do get a sphere from the pointlike nucleus. And the atom is not a point: its electron cloud is a blob about 1 Å wide, every part of which radiates, and those internal wavelets interfere with each other. The atom is a tiny double-slit experiment with itself. Their growing cancellation at high k is exactly the decaying form factor f(k), the single-atom hill that the real-data section below has to fit away. One atom alone just re-broadcasts. Two atoms re-broadcast from two places, and the ripples overlap: along some directions crest lands on crest (bright), along others crest lands on trough (dark). This is the double-slit experiment, atom edition. A slit in a wall and an atom do the same job, acting as a point re-broadcaster, and the slit spacing is the pair distance r: .. raw:: html The strip on the right is the double-slit fringe pattern on a detector screen. Drag the atoms apart and the fringes tighten; shorten λ and they tighten too. Now press **Double slit**: the atoms are replaced by a wall with two gaps at the same spots, and the detector pattern does not change. That is the entire relationship: slit or atom, anything that re-broadcasts a wave from a point writes the same fringes. Diffraction from matter is the double-slit experiment with atoms as the slits. One stitch before moving on: a screen sees every angle at once, and each angle corresponds to one value of k. So "walking along the fringe pattern" and "sweeping k at a single detector" are the same act. From here on we stand at one detector and turn k. One pair, two waves: where the sine comes from ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Take the simplest case: two atoms, one detector. Both atoms scatter the same incoming wave, so the detector receives two copies, and the copy from the farther atom arrives late. The question: when do the two copies reinforce, and when do they cancel? Hold three physical pictures. k is a ruler: how many wave repeats fit in one unit of length (the detector angle selects it). The product kr is a count: **how many wave cycles fit between the two atoms**. And the rule is: whole number of cycles, the copies arrive in step, bright; an extra half cycle, they arrive opposite, dark. Sweep k and one more cycle fits every time k grows by 1/r, so the brightness rings with period 1/r. The ringing speed is the distance. The sine shape itself is just the wave's own profile showing through (:math:`\Delta\varphi = 2\pi k r` is the cycle count in radians, and the summed brightness oscillates as :math:`\cos(2\pi k r)`). .. raw:: html One more step reaches the Debye formula. A liquid or glass holds this pair in every orientation, and a tilted pair presents a shorter projected distance to the beam, so its fringe is slower. Press **Average all orientations**: the fringes agree near k = 0 and disagree more and more at high k, so their average oscillates with period 1/r but decays. That average is exactly :math:`\sin(2\pi k r)/(2\pi k r)`. Why sin(x)/x exactly? ^^^^^^^^^^^^^^^^^^^^^^ Why does that average come out to a sine divided by x? A pair tilted at fraction u of full alignment reads a phase of x·u (with x = 2πkr), so running over all orientations reads a plain cosine at every phase from 0 to x, evenly. The orientation average is therefore just the average height of a cosine over the window [0, x]: **area divided by length**. The area under a cosine accumulates into a sine, so the average is sin(x)/x. .. raw:: html Short window: the cosine has not bent yet, every orientation reads about 1, fully constructive. Long window: each whole cycle cancels itself (green against red), only the last partial cycle survives, and that fixed-size leftover divided by an ever-longer window is the 1/x decay. The wiggle is just whether the window ends on a crest or a trough. You now know everything a diffractometer knows. Time to use it: below, one pair is hidden (held at a fixed orientation, so its fringe is the plain cosine), r is invisible, and k is the only knob you have. Sweep k, watch the lamp flutter, and read the distance out of the flutter rate: .. raw:: html When your dashed prediction lies on your measured dots, you have measured an atomic distance without ever seeing an atom. That is the entire profession of diffraction, in one slider. A real sample is not one pair but every pair at once. Each pair contributes its own ripple :math:`\sin(2\pi k r)/(2\pi k r)`, and the structure factor S(k) is the pile. The Debye formula is the bookkeeping: .. math:: S(k) = 1 + \frac{2}{N} \sum_{i