B12 · Lesson 5 · Crystal structure lab
Building lattices, computing structure factors and powder patterns, and fitting a lattice constant, in Python
Lessons 1 to 4 described crystals by their cells, planes and diffraction peaks, and worked a few cases by hand. Real crystallography is computation: generate the atoms, sum their scattered waves to see which reflections survive, list where the peaks fall, and fit a lattice constant to measured positions. In this lab you'll build those tools for the common cubic structures, then use them on silicon and on a silicon–germanium layer, the way a fab's X-ray tool checks a wafer.
- The curves are the scattering angles 2θ of silicon's first four allowed reflections, (111), (220), (311) and (400), against the X-ray wavelength.
- Bragg's law, , pushes every peak to larger angles as the wavelength grows; the marker sits at copper Kα, 0.15406 nm.
- The lattice-constant slider shows how a strained or alloyed layer's peaks shift. The readouts give the peaks at copper Kα.
Predict
Silicon has the diamond structure: an fcc lattice with two atoms per lattice point. Copper is plain fcc. Which reflection appears for copper but is missing for silicon?
(200). In fcc, reflections appear when h, k and l are all odd or all even, so copper shows (111), (200), (220) and more. Silicon's second atom, shifted by a quarter of the body diagonal, scatters (200) exactly out of phase with the first, so the two cancel. Step 2 computes this from the atoms' positions.
Name it
Lattices and bases
A crystal is a lattice plus a basis. In fractional coordinates of the cubic cell: simple cubic has one atom at (0, 0, 0); bcc adds (½, ½, ½); fcc adds the three face centers; diamond repeats the fcc set shifted by (¼, ¼, ¼), for 8 atoms per cell. Nearest-neighbor distances come from searching all atoms in the cell and its neighbors for the shortest separation.
The structure factor
Each atom scatters with a phase set by its position. For reflection (hkl), the cell's waves add to
and the peak's intensity goes as . With identical atoms ( = 1), fcc gives F = 4 when h, k, l are unmixed and 0 otherwise; diamond further cancels the even reflections with h + k + l = 4n + 2, such as (200) and (222).
A powder pattern
Every allowed reflection with has spacing and appears at , until exceeds 1.
Fitting a lattice constant
Squaring Bragg's law gives , linear in s. A least-squares fit of against through the origin gives a slope and , using every measured peak at once.
Worked example
Where do silicon's first five allowed reflections fall with copper Kα (λ = 0.15406 nm, a = 0.5431 nm)?
Show the solution
- The allowed reflections. Diamond's allowed reflections, in order of s, are (111), (220), (311), (400) and (331), with s = 3, 8, 11, 16 and 19.
- Bragg's law. Each angle comes from
- The five angles.
- The fingerprint. Copper's fcc pattern would also show (200) and (222); their absence is the fingerprint of the diamond structure.
Answer the first five reflections fall at 2θ = 28.44°, 47.30°, 56.12°, 69.13° and 76.38°.
Worked example
Why does silicon's (200) reflection vanish? Compute for the diamond basis.
Show the solution
- The fcc atoms. Each of the four fcc atoms contributes , and 2x is 0 or 1 for all of them, so the fcc part is 4.
- The shifted atoms. The four shifted atoms each pick up an extra phase
- Add the two parts.
- The (111) reflection. Here the shift's phase is , giving
- The (220) reflection. Here it's , giving 8.
- Weak forbidden peaks. Weak forbidden peaks do sometimes appear, from the bonding charge between atoms, which isn't spherical.
Answer the shifted atoms' phase of −1 cancels the fcc part exactly, so and the reflection vanishes.
Worked example
A relaxed layer follows Vegard's law between silicon (0.5431 nm) and germanium (0.5658 nm). Where's its (400) peak, and how far from silicon's?
Show the solution
- Lattice constant.
- Peak position.
- Compare with silicon. The silicon substrate's peak is at 69.13°, so the layer's is 0.65° lower, easily resolved.
- What a diffractometer reads. A high-resolution diffractometer reads the layer's composition (and, from the peaks' widths and asymmetric reflections, its strain) from shifts like this.
Answer the (400) peak falls at 2θ = 68.48°, 0.65° below silicon's 69.13°.
Check
Step 1. Write basis(kind) returning the fractional positions for 'sc', 'bcc', 'fcc' or 'diamond', and nearest(kind, a) returning the nearest-neighbor distance, searching the cell and its 26 neighboring copies.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write structure_factor(kind, h, k, l) returning for identical atoms on your basis.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write powder_peaks(kind, a, lam, smax) returning a sorted list of (two_theta_degrees, s) for every distinct smax that has an allowed reflection and a real angle.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 4. Write fit_lattice(peaks, lam) that takes measured (two_theta_degrees, s) pairs and returns the lattice constant from a least-squares fit of against through the origin.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 5. Write sige_peak(x, lam) returning the (400) scattering angle in degrees for relaxed by Vegard's law (silicon 0.5431, germanium 0.5658 nm), and ge_fraction(two_theta, lam) inverting it.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A cubic crystal has 4 atoms per cell of average molar mass 28.09 g/mol and lattice constant 0.5658 nm.
(a)
How many atoms per cm³, in units of 10²²?
(b)
What's its density?
Write units the way you normally would: 1.5 g/cm³, 1500 mg/cm³ and 0.0015 kg/cm³ are the same answer.
Check
A cubic crystal with a = 0.5431 nm is measured with 0.07093 nm X-rays. Where does the reflection with = 8 fall?
Check
A copper Kα (0.15406 nm) peak at 2θ = 47.3° is indexed with = 3. What lattice constant does it imply?
Write units the way you normally would: 1.5 nm, 1500 pm and 0.0015 µm are the same answer.
Check
Where does the (400) peak of relaxed with x = 0.25 fall, with copper Kα?
Explain why
Why do some reflections vanish completely even though planes with those indices exist in the crystal?
Every set of lattice planes reflects, but within each cell there may be several atoms, and the waves they scatter arrive with different phases. For some reflections the atoms' phases cancel exactly. In diamond, the second fcc sublattice is shifted by a quarter of the body diagonal, which for (200) adds a phase of π to every one of its atoms, so its four atoms cancel the other four. The planes are there, but halfway between each pair sits an equally dense plane of the other sublattice that scatters exactly out of phase. The pattern of missing reflections is what tells crystallographers which basis a lattice carries.
Practice
Keep practicing
6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.