Powder patterns: NaCl from a prototype to a publication figure¶
This tutorial builds rock-salt NaCl, calculates its X-ray powder pattern with stated displacement parameters, adds the Kα2 doublet and a preferred orientation, and draws publication figures. Every number comes from the structure and the settings you give; nothing is fitted.
You need vibe-sketcher. The commands run in an empty directory and write
xrd.vsk there. The powder diffraction guide is
the reference for every setting.
1. Build NaCl¶
vibe-sketcher solid crystal xrd.vsk --id nacl --prototype rocksalt --species Mg=Na --species O=Cl --a 5.640 --cell conventional
The rocksalt prototype is written for MgO, so --species renames the two
elements. --a 5.640 is the cubic constant in ångström, and
--cell conventional keeps the eight-atom cubic cell. The reflection list is
the same in the primitive cell; the conventional one has the familiar
indices.
2. Calculate the pattern¶
vibe-sketcher solid powder xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 --two-theta 20,80
The output lists every reflection family between 20 and 80 degrees 2θ for Cu Kα1 (1.5405929 Å, the default):
# wavelength 1.5405929 A; unpolarised
h k l m d/A 2theta I_rel
1 1 1 8 3.2563 27.367 8.7
2 0 0 6 2.8200 31.704 100.0
2 2 0 12 1.9940 45.449 60.4
3 1 1 24 1.7005 53.870 2.1
2 2 2 8 1.6281 56.474 17.9
4 0 0 6 1.4100 66.228 7.2
3 3 1 24 1.2939 73.072 1.0
4 2 0 24 1.2611 75.294 17.7
--b-isogives each element’s isotropic displacement parameter B in Ų. Without it, B is 0 (a static lattice) and the result says so.111 and 311 are weak because Na and Cl scatter in antiphase for odd indices. Their intensity is the difference of two form factors.
I_relis scaled so the strongest line is 100. The full result, with the multiplicity, |F|², the Lorentz-polarisation factor and the absolute intensity, comes with--jsonor as CSV:
vibe-sketcher solid powder xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 -o nacl.csv
The CSV starts with provenance lines: the wavelength and its source, the structure’s digest, and the form-factor reference.
3. Draw the pattern¶
vibe-sketcher solid powder-figure xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 --two-theta 20,80 --fwhm 0.1 --label-reflections 6 --title "NaCl, Cu Kα1" -o nacl-pattern.svg
--fwhm 0.1 draws every reflection as a pseudo-Voigt peak 0.1 degrees wide
(use --caglioti U,V,W for a width that grows with angle).
--label-reflections 6 labels the six strongest ticks. The provenance line
under the axis names the structure digest, the wavelength and the
assumptions, so a figure can be traced back to its model.
The calculated NaCl pattern with Cu Kα1, B(Na) = 1.6 Ų and B(Cl) = 1.2 Ų.¶
4. Add the Kα2 doublet¶
A laboratory tube emits Kα1 and Kα2 together, so every measured peak is a
doublet that separates at high angle. --kalpha2 adds the second line:
vibe-sketcher solid powder-figure xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 --two-theta 72,77 --fwhm 0.05 --step 0.005 --kalpha2 --label-reflections 1 --title "NaCl (420), Cu Kα1 + Kα2" -o nacl-kalpha2.svg
The (420) doublet: Kα1 at 75.29°, Kα2 at 75.52°.¶
The Kα2 wavelength of Cu, 1.5444274 Å, is the NIST X-ray Transition Energies Database value. With
--wavelength MoKa1, the Mo partner is used. With a numeric--wavelength, give--kalpha2-wavelengthtoo.The intensity ratio is 0.5 by default. That is a convention, the 2:4 weight of the two 2p holes, not a measured value for your tube; state yours with
--kalpha2-ratio.Ticks and hkl labels stay at the Kα1 positions. The figure’s second provenance line records the Kα2 wavelength and ratio.
5. Platelets: preferred orientation¶
Plate-like crystallites lie flat on a flat sample holder, which strengthens the reflections along the plate normal. The March–Dollase correction describes this with one parameter r along a stated direction:
vibe-sketcher solid powder xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 --two-theta 20,80 --preferred-orientation 0,0,1 --march-r 0.7
With r = 0.7 along (001)*, (220) falls from 60 to about 40 relative to (200), because only some of the {200} members lie along the normal and none of the {220} members do. r = 1 is a random powder. The correction is named in the result and on any figure.
6. Another wavelength¶
vibe-sketcher solid powder xrd.vsk --structure nacl --b-iso Na=1.6 --b-iso Cl=1.2 --wavelength MoKa1 --two-theta 5,40
With Mo Kα1 (0.7093171 Å) the same reflections appear at about half the angle: (200) moves from 31.7 to 14.4 degrees.
Compare with a measurement¶
solid powder-measured reads a two-column XY or CSV file with a stated axis
(two_theta_deg, d_angstrom or q_inv_angstrom) and wavelength, and
solid powder-figure --measured FILE draws it against the calculation. A 2θ
comparison is refused when the two wavelengths differ, because the peaks
would not line up for a physical reason; compare in d or Q instead. The
calculated curve is scaled for display only. See
measured patterns.
Where to go next¶
Put these figures into a labelled multi-panel figure in Publication figures.
Calculate the pattern of an imported CIF with
--cif, which keeps its partial occupancies and U_iso values; see From a CIF.The same calculation runs from Python; see the powder pattern example.