Examples#

This gallery walks through every public feature of chemistrykit.crystal: the 7 crystal systems and general unit-cell volume; hard-sphere packing (packing fraction, coordination number) for the SC/BCC/FCC/HCP lattices; ionic-crystal lattice energy via the Born-Lande and Kapustinskii equations, backed by a genuinely converging (Evjen-method) numerical Madelung constant; Bragg’s law and powder-XRD peak positions with structure factors and systematic absences, Laue interference, and Scherrer crystallite sizes; Schottky/Frenkel point-defect equilibrium; Miller indices, interfacial angles, and the 14 Bravais lattices; and Pauling’s radius-ratio rule and Goldschmidt’s perovskite tolerance factor.

Each script in this gallery is self-contained and can be run directly with python examples/crystal/<section>/<script>.py. Every script also carries an RST module docstring as its title/description and uses # %% markers to split narrative text from code, which is exactly what Sphinx-Gallery renders into the pages below – the script is the source of truth for what you see, not a copy of it.

Sections#

  • crystal_systems – classifying a unit cell into one of the 7 crystal systems, the general lattice-parameter volume formula, Steno’s interfacial angles, Miller indices from face intercepts, and the 14 Bravais lattices.

  • packing – atomic packing factor, coordination number, and atoms per cell for SC, BCC, FCC, and ideal HCP.

  • lattice_energy – the Born-Lande and Kapustinskii equations, and Shannon’s effective ionic radii.

  • madelung – Madelung’s lattice sum shell by shell, and the NaCl Madelung constant from a genuinely converging (Evjen-method) lattice summation, contrasted with a naive truncated sum that does not converge.

  • xrd – Bragg’s law, cubic d-spacings, and simulated powder-XRD patterns with systematic absences for SC/BCC/FCC, Laue interference, and Scherrer crystallite sizes.

  • defects – Frenkel and Schottky point-defect concentration vs. temperature.

  • crystal_chemistry – Pauling’s radius-ratio rule and Goldschmidt’s perovskite tolerance factor.

Crystal chemistry#

Rules of thumb from ionic radii: Pauling’s radius-ratio rule for coordination numbers and Goldschmidt’s tolerance factor for perovskites.

Pauling’s radius-ratio rule: predicting coordination numbers

Pauling's radius-ratio rule: predicting coordination numbers

Goldschmidt’s tolerance factor: which perovskites are cubic

Goldschmidt's tolerance factor: which perovskites are cubic

Crystal systems#

Classifying a unit cell into one of the 7 crystal systems from its lattice parameters and the general unit-cell-volume formula; Steno’s constant interfacial angles; Miller indices from Hauy’s rational face intercepts; and the 14 Bravais lattices.

Weiss’s crystal systems: classifying a unit cell by its axes

Weiss's crystal systems: classifying a unit cell by its axes

Steno’s law: constancy of interfacial angles

Steno's law: constancy of interfacial angles

Hauy’s law of rational indices: Miller indices from face intercepts

Hauy's law of rational indices: Miller indices from face intercepts

Bravais lattices: the 14 lattices and the three cubic centerings

Bravais lattices: the 14 lattices and the three cubic centerings

Point defects#

Frenkel and Schottky point-defect concentrations vs. temperature, from Boltzmann-factor equilibrium.

Frenkel defects: vacancy-interstitial pairs in silver chloride

Frenkel defects: vacancy-interstitial pairs in silver chloride

Schottky defects: paired cation and anion vacancies in rock salt

Schottky defects: paired cation and anion vacancies in rock salt

Lattice energy#

The Born-Lande and Kapustinskii equations for ionic-crystal lattice energy, and the Shannon ionic radii the Kapustinskii equation uses.

Born-Lande equation: lattice energies of the alkali halides

Born-Lande equation: lattice energies of the alkali halides

Kapustinskii equation: lattice energy without a crystal structure

Kapustinskii equation: lattice energy without a crystal structure

Shannon’s effective ionic radii: additivity and periodic trends

Shannon's effective ionic radii: additivity and periodic trends

Madelung constant#

Madelung’s electrostatic lattice sum for NaCl, shell by shell, and Evjen’s genuinely converging summation of it, contrasted with a naive truncated sum that does not converge.

Evjen’s method: converging the NaCl Madelung constant

Evjen's method: converging the NaCl Madelung constant

Madelung’s lattice sum: the electrostatic energy of rock salt

Madelung's lattice sum: the electrostatic energy of rock salt

Hard-sphere packing#

Atomic packing factor, coordination number, and atoms per cell for the simple cubic, body-centered cubic, face-centered cubic, and ideal hexagonal close-packed lattices.

Kepler’s conjecture: packing efficiency of SC, BCC, FCC, and HCP

Kepler's conjecture: packing efficiency of SC, BCC, FCC, and HCP

Powder XRD#

Laue interference from a periodic array, Bragg’s law and simulated powder-XRD patterns with structure factors and systematic absences for SC, BCC, and FCC, and Scherrer crystallite sizes from line broadening.

Bragg’s law: indexing powder XRD peaks

Bragg's law: indexing powder XRD peaks

Laue’s interference: sharp diffraction spots from a periodic array

Laue's interference: sharp diffraction spots from a periodic array

Scherrer equation: crystallite size from peak broadening

Scherrer equation: crystallite size from peak broadening

Gallery generated by Sphinx-Gallery