projects / TEM diffraction calculator

TEM diffraction calculator

◆ completed 2020 python, pymatgen, numpy visit site ↗ github ↗
simulated diffraction pattern

pymatgen’s TEM module simulates selected-area electron diffraction. Give it a crystal structure and a beam direction, and it returns the spot pattern a microscopist would see, with interplanar spacings, structure factors, and hkl labels.

Getting it merged involved refactoring the interplanar-spacing code onto pymatgen’s lattice utilities, vectorizing pattern generation with NumPy, correcting structure factors against standard crystallography tables, and fixing a bug that blanked the (110) family of beam directions. Before merge I validated the calculator against 600+ diffraction patterns with randomized beam directions on Materials Project iron-oxide structures.

The module ships in pymatgen’s diffraction package, and I am listed as a project developer on the pymatgen team page. The pattern above is its output for silicon down the [110] zone axis.