crystal_lattice
Crystallography of one unit cell, any of the seven crystal systems: cell volume and reciprocal cell, the spacing d of any plane (hkl), its Bragg angle at a wavelength, which reflections the centring (P, I, F, A, B, C, R) or the diamond and hcp structures extinguish, the theoretical density from the atoms in the cell, and for sc, bcc, fcc, hcp and diamond the nearest-neighbour distance, coordination number and hard-sphere packing fraction found from the atom positions.
Writes the powder line positions and multiplicities as a csv.
No intensities: no structure factors or scattering factors.
- Field
- Materials and crystals
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.1 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001silicon, diamond cubic a = 5.4310 A at Cu K-α₁ 1.5406 A: closed forms d = a/√(h²+k²+l²) (d111 = 3.1356 A), Bragg 2θ = 2 asin(λ/2d) (28.44°), packing π √(3)/16 = 0.34009, neighbour a √(3)/4; diamond rule: 200 and 222 absent, so the lines run 111 (x₈), 220 (x12), 311 (x24) (rel 10⁻⁹)passed
d_A3.13559 ± 3.1 × 10⁻⁹3.13559lockedunder 0.01 % of the tolerance usedtwo_theta_deg28.4421 ± 2.8 × 10⁻⁸28.4421lockedunder 0.01 % of the tolerance usedvolume_A3160.191 ± 1.6 × 10⁻⁷160.191lockedunder 0.01 % of the tolerance usedpacking_fraction0.340087 ± 3.4 × 10⁻¹⁰0.340087lockedunder 0.01 % of the tolerance usednearest_neighbour_A2.35169 ± 2.4 × 10⁻⁹2.35169lockedunder 0.01 % of the tolerance usedcoordination_number= 44lockedexact matchatoms_per_cell8 ± 8 × 10⁻⁹8lockedunder 0.01 % of the tolerance usedreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= truemisseddiffersreflections.3.d_A= 1.35775, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagen_lines= 33lockedexact matchlines.0.name= 111misseddifferslines.0.multiplicity= 8misseddifferslines.1.name= 220misseddifferslines.1.multiplicity= 12misseddifferslines.1.two_theta_deg= 47.302294, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.name= 311misseddifferslines.2.multiplicity= 24misseddifferslines.2.two_theta_deg= 56.121812, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0002copper, fcc a = 3.6149 A, M = 63.546 g/mol: density 4M/(N_A a³) = 8.935 g/cm³, packing π/(3 √2) = 0.74048, neighbour a/√(2), 12 neighbours; F rule (all odd or all even): 100 and 110 absent, 111 and 200 present (rel 10⁻⁹)passed
density_g_per_cm38.93529 ± 8.9 × 10⁻⁹8.93529lockedunder 0.01 % of the tolerance usedpacking_fraction0.74048 ± 7.4 × 10⁻¹⁰0.74048lockedunder 0.01 % of the tolerance usednearest_neighbour_A2.55612 ± 2.6 × 10⁻⁹2.55612lockedunder 0.01 % of the tolerance usedcoordination_number= 1212lockedexact matchatoms_per_cell4 ± 4 × 10⁻⁹4lockedunder 0.01 % of the tolerance usedd_A2.08706 ± 2.1 × 10⁻⁹2.08706lockedunder 0.01 % of the tolerance usedreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= truemisseddiffersreflections.3.two_theta_deg= 50.45082, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.name= 111misseddifferslines.0.multiplicity= 8misseddifferslines.1.name= 200misseddifferslines.1.multiplicity= 6misseddiffersr0003α iron, bcc a = 2.8665 A, M = 55.845 g/mol: density 2M/(N_A a³) = 7.874 g/cm³, packing π √(3)/8 = 0.68017, neighbour a √(3)/2, 8 neighbours; I rule (h+k+l even): 100 and 111 absent, 110 and 200 present (rel 10⁻⁹)passed
density_g_per_cm37.87422 ± 7.9 × 10⁻⁹7.87422lockedunder 0.01 % of the tolerance usedpacking_fraction0.680175 ± 6.8 × 10⁻¹⁰0.680175lockedunder 0.01 % of the tolerance usednearest_neighbour_A2.48246 ± 2.5 × 10⁻⁹2.48246lockedunder 0.01 % of the tolerance usedcoordination_number= 88lockedexact matchd_A2.02692 ± 2 × 10⁻⁹2.02692lockedunder 0.01 % of the tolerance usedtwo_theta_deg44.6716 ± 4.5 × 10⁻⁸44.6716lockedunder 0.01 % of the tolerance usedreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= truemisseddifferslines.0.name= 110misseddifferslines.0.multiplicity= 12misseddiffersr0004simple cubic a = 3 A: packing π/6 = 0.52360, neighbour a, 6 neighbours, one atom per cell, every reflection present, first line 100 (x₆) at 2 asin(λ/2a) (rel 10⁻⁹)passed
packing_fraction0.523599 ± 5.2 × 10⁻¹⁰0.523599lockedunder 0.01 % of the tolerance usednearest_neighbour_A3 ± 3 × 10⁻⁹3lockedunder 0.01 % of the tolerance usedcoordination_number= 66lockedexact matchatoms_per_cell1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance usedvolume_A327 ± 2.7 × 10⁻⁸27lockedunder 0.01 % of the tolerance usedallowed= truetruelockedexact matchtwo_theta_deg29.7566 ± 3 × 10⁻⁸29.7566lockedunder 0.01 % of the tolerance usedlines.0.name= 100misseddifferslines.0.multiplicity= 6misseddiffersr0005ideal hcp a = 3.2094 A, c left out: c/a = √(8/3), packing π/(3 √2) = 0.74048 (same as fcc), 12 neighbours at a, volume (√3/2) a² c; 001 absent (l odd, h+2k = 3n), 002 at c/2, 100 at a √(3)/2, 101 present from 1/d² = 4(h²+hk+k²)/(3a²) + l²/c² (rel 10⁻⁹)passed
c_over_a1.63299 ± 1.6 × 10⁻⁹1.63299lockedunder 0.01 % of the tolerance usedpacking_fraction0.74048 ± 7.4 × 10⁻¹⁰0.74048lockedunder 0.01 % of the tolerance usednearest_neighbour_A3.2094 ± 3.2 × 10⁻⁹3.2094lockedunder 0.01 % of the tolerance usedcoordination_number= 1212lockedexact matchvolume_A346.7505 ± 4.7 × 10⁻⁸46.7505lockedunder 0.01 % of the tolerance usedd_A2.62046 ± 2.6 × 10⁻⁹2.62046lockedunder 0.01 % of the tolerance usedreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.d_A= 2.779422, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereflections.3.d_A= 2.455486, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereflections.3.allowed= truemisseddiffersr0006triclinic 4 × 5 × 6 A with all angles 90°: the triclinic volume formula reduces to abc = 120 A³ and d123 to 1/√(1/a² + 4/b² + 9/c²) (rel 10⁻⁹)passed
volume_A3120 ± 1.2 × 10⁻⁷120lockedunder 0.01 % of the tolerance usedd_A1.45479 ± 1.5 × 10⁻⁹1.45479lockedunder 0.01 % of the tolerance usedreciprocal.a_star_per_A= 0.25, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereciprocal.gamma_star_deg= 90, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0007rhombohedral cell a = 2.5 A, α = 60° (the primitive cell of fcc with cube edge a √2): volume a³/√(2), a quarter of the cube; its 111 and 100 planes are both cube {111} planes, d = a √(2/3) (rel 10⁻⁹)passed
volume_A311.0485 ± 1.1 × 10⁻⁸11.0485lockedunder 0.01 % of the tolerance usedd_A2.04124 ± 2 × 10⁻⁹2.04124lockedunder 0.01 % of the tolerance usedreflections.1.d_A= 2.041241, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0008monoclinic 5 × 6 × 7 A, β = 110°: volume abc sin(β), d100 = a sin(β), d010 = b, d001 = c sin(β), β* = 180 - β (rel 10⁻⁹)passed
volume_A3197.335 ± 2 × 10⁻⁷197.335lockedunder 0.01 % of the tolerance usedd_A4.69846 ± 4.7 × 10⁻⁹4.69846lockedunder 0.01 % of the tolerance usedreflections.1.d_A= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereflections.2.d_A= 6.577848, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereciprocal.beta_star_deg= 70, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereciprocal.a_star_per_A= 0.212836, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0009hexagonal a = 3 A, c = 5 A: volume (√3/2) a² c, d110 = a/2, d112 from 1/d² = 4(h²+hk+k²)/(3a²) + l²/c², a* = 2/(a √3), γ* = 60° (rel 10⁻⁹)passed
volume_A338.9711 ± 3.9 × 10⁻⁸38.9711lockedunder 0.01 % of the tolerance usedd_A1.5 ± 1.5 × 10⁻⁹1.5lockedunder 0.01 % of the tolerance usedreflections.1.d_A= 1.286239, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereciprocal.a_star_per_A= 0.3849, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagereciprocal.gamma_star_deg= 60, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0010copper as an R lattice on hexagonal axes (a =
a_c/√2, c =a_c√3, Z = 3,a_c= 3.6149 A): the same crystal as the fcc case, so density 4M/(N_Aa_c³) = 8.935 g/cm³, volume 3a_c^3/4, linesa_c/√3 (x₈) then a_c/2 (x₆); R rule -h+k+l = 3n: 001, 002, 100 absent, 003 and 101 present (rel 10⁻⁹)passeddensity_g_per_cm38.93529 ± 8.9 × 10⁻⁹8.93529lockedunder 0.01 % of the tolerance usedvolume_A335.4283 ± 3.5 × 10⁻⁸35.4283lockedunder 0.01 % of the tolerance usedd_A2.08706 ± 2.1 × 10⁻⁹2.08706lockedunder 0.01 % of the tolerance usedreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= falsemisseddiffersreflections.4.allowed= truemisseddiffersreflections.4.d_A= 2.087063, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.d_A= 2.087063, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.multiplicity= 8misseddifferslines.1.d_A= 1.80745, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.1.multiplicity= 6misseddiffersr0011A-centred orthorhombic 4 × 5 × 6 A: the extra lattice point at (0, 1/2, 1/2) gives the structure factor 1 + exp(i π (k+l)), zero when k+l is odd, so 010, 001, 110, 101, 1 -2 3 are absent; the lines run 100 (x₂, d = 4 A), 011 (x₄, d from 1/d² = h²/a² + k²/b² + l²/c²), 002 (x₂, d = 3 A) (rel 10⁻⁹)passed
d_A2.77054 ± 2.8 × 10⁻⁹2.77054lockedunder 0.01 % of the tolerance usedallowed= truetruelockedexact matchreflections.0.allowed= truemisseddiffersreflections.1.allowed= truemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= falsemisseddiffersreflections.4.allowed= falsemisseddiffersreflections.5.allowed= falsemisseddiffersreflections.6.allowed= truemisseddiffersreflections.7.allowed= falsemisseddifferslines.0.name= 100misseddifferslines.0.multiplicity= 2misseddifferslines.0.d_A= 4, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.two_theta_deg= 22.206193, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.1.name= 011misseddifferslines.1.multiplicity= 4misseddifferslines.1.d_A= 3.841106, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.name= 002misseddifferslines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.multiplicity= 2misseddiffersr0012B-centred orthorhombic 4 × 5 × 6 A: the extra lattice point at (1/2, 0, 1/2) gives the structure factor 1 + exp(i π (h+l)), zero when h+l is odd, so 100, 001, 110, 011 are absent; the lines run 010 (x₂, d = 5 A), 101 (x₄, d from 1/d² = h²/a² + k²/b² + l²/c²), 002 (x₂, d = 3 A) (rel 10⁻⁹)passed
d_A2.77054 ± 2.8 × 10⁻⁹2.77054lockedunder 0.01 % of the tolerance usedallowed= truetruelockedexact matchreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= truemisseddiffersreflections.3.allowed= falsemisseddiffersreflections.4.allowed= falsemisseddiffersreflections.5.allowed= truemisseddiffersreflections.6.allowed= falsemisseddiffersreflections.7.allowed= truemisseddifferslines.0.name= 010misseddifferslines.0.multiplicity= 2misseddifferslines.0.d_A= 5, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.two_theta_deg= 17.724567, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.1.name= 101misseddifferslines.1.multiplicity= 4misseddifferslines.1.d_A= 3.328201, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.name= 002misseddifferslines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.multiplicity= 2misseddiffersr0013C-centred orthorhombic 4 × 5 × 6 A: the extra lattice point at (1/2, 1/2, 0) gives the structure factor 1 + exp(i π (h+k)), zero when h+k is odd, so 100, 010, 101, 011, 1 -2 3 are absent; the lines run 001 (x₂, d = 6 A), 110 (x₄, d from 1/d² = h²/a² + k²/b² + l²/c²), 002 (x₂, d = 3 A) (rel 10⁻⁹)passed
d_A2.77054 ± 2.8 × 10⁻⁹2.77054lockedunder 0.01 % of the tolerance usedallowed= truetruelockedexact matchreflections.0.allowed= truemisseddiffersreflections.1.allowed= falsemisseddiffersreflections.2.allowed= falsemisseddiffersreflections.3.allowed= truemisseddiffersreflections.4.allowed= truemisseddiffersreflections.5.allowed= falsemisseddiffersreflections.6.allowed= falsemisseddiffersreflections.7.allowed= falsemisseddifferslines.0.name= 001misseddifferslines.0.multiplicity= 2misseddifferslines.0.d_A= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.0.two_theta_deg= 14.752363, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.1.name= 110misseddifferslines.1.multiplicity= 4misseddifferslines.1.d_A= 3.123475, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.name= 002misseddifferslines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagelines.2.multiplicity= 2misseddiffers
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
structure | custom | A one-element structure fixes system, centring and atom positions; custom takes them from system and centring. | |
system | cubic | Crystal system. trigonal means rhombohedral axes (a, α); monoclinic has unique axis b. | |
centring | P | Lattice centring; R is a rhombohedral lattice on hexagonal axes, obverse setting. | |
a_A | Å | Cell edge a. | |
b_A | Å | Cell edge b; leave out where the system fixes it. | |
c_A | Å | Cell edge c; leave out where the system fixes it. For hcp, left out means the ideal √(8/3) a. | |
alpha_deg | deg | Cell angle α; leave out where the system fixes it. | |
beta_deg | deg | Cell angle β; leave out where the system fixes it. | |
gamma_deg | deg | Cell angle γ; leave out where the system fixes it. | |
hkl | [[1, 1, 1]] | Planes to report, as [h, k, l] triples. The first one feeds d_A and two_theta_deg. | |
wavelength_A | Å | 1.5406 | Radiation wavelength; the default is Cu K-α₁. |
two_theta_max_deg | deg | 120 | Upper end of the powder pattern. |
molar_mass_g_per_mol | g/mol | Molar mass of one formula unit (one atom for the named structures); gives the density. | |
formula_units | 1 | Formula units per cell (Z), for a custom cell with molar_mass_g_per_mol. | |
atoms | The cell contents instead of molar_mass_g_per_mol: atoms per cell of each kind with their molar masses. |
Readings
| Name | Unit | Meaning |
|---|---|---|
a_A | Å | |
b_A | Å | |
c_A | Å | |
alpha_deg | deg | |
beta_deg | deg | |
gamma_deg | deg | |
c_over_a | 1 | |
volume_A3 | ų | |
reciprocal | Reciprocal cell (crystallographers' convention, no 2 π). | |
atoms_per_cell | 1 | |
formula_units | 1 | |
mass_per_cell_g_per_mol | g/mol | Mass of one mole of cells. |
density_g_per_cm3 | g/cm³ | Theoretical (X-ray) density; null without masses. |
nearest_neighbour_A | Å | Named structures only. |
atomic_radius_A | Å | Half the nearest-neighbour distance. |
coordination_number | 1 | Atoms at exactly the nearest-neighbour distance. A real hcp metal (c/a not √(8/3)) gives 6, not the 12 of the ideal cell. |
packing_fraction | 1 | Equal hard spheres touching at the nearest-neighbour distance. |
wavelength_A | Å | |
d_min_A | Å | Smallest spacing reachable below two_theta_max_deg. |
d_A | Å | Spacing of the first plane in hkl. |
two_theta_deg | deg | Bragg 2 θ of the first plane in hkl; null when λ > 2d. |
allowed | Whether the first plane in hkl survives the reflection rule. | |
reflections | One row per plane in hkl; also out/reflections.csv. | |
n_lines | 1 | Powder lines below two_theta_max_deg. |
first_line_two_theta_deg | deg | |
lines | First 40 powder lines; all of them in out/powder_pattern.csv. Planes sharing one d (333 and 511) are one line, named after one of them, multiplicities added. | |
pattern_complete | False when the index limit of 40 cut the pattern short, or it has no line. |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.