Invntr
Source

All instruments

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

Admission replaycrystal_lattice 0.1.0 · files 17483c387138…9a18
  1. 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 used
    two_theta_deg28.4421 ± 2.8 × 10⁻⁸28.4421lockedunder 0.01 % of the tolerance used
    volume_A3160.191 ± 1.6 × 10⁻⁷160.191lockedunder 0.01 % of the tolerance used
    packing_fraction0.340087 ± 3.4 × 10⁻¹⁰0.340087lockedunder 0.01 % of the tolerance used
    nearest_neighbour_A2.35169 ± 2.4 × 10⁻⁹2.35169lockedunder 0.01 % of the tolerance used
    coordination_number= 44lockedexact match
    atoms_per_cell8 ± 8 × 10⁻⁹8lockedunder 0.01 % of the tolerance used
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= truemisseddiffers
    reflections.3.d_A= 1.35775, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    n_lines= 33lockedexact match
    lines.0.name= 111misseddiffers
    lines.0.multiplicity= 8misseddiffers
    lines.1.name= 220misseddiffers
    lines.1.multiplicity= 12misseddiffers
    lines.1.two_theta_deg= 47.302294, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.name= 311misseddiffers
    lines.2.multiplicity= 24misseddiffers
    lines.2.two_theta_deg= 56.121812, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  2. r0002copper, 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 used
    packing_fraction0.74048 ± 7.4 × 10⁻¹⁰0.74048lockedunder 0.01 % of the tolerance used
    nearest_neighbour_A2.55612 ± 2.6 × 10⁻⁹2.55612lockedunder 0.01 % of the tolerance used
    coordination_number= 1212lockedexact match
    atoms_per_cell4 ± 4 × 10⁻⁹4lockedunder 0.01 % of the tolerance used
    d_A2.08706 ± 2.1 × 10⁻⁹2.08706lockedunder 0.01 % of the tolerance used
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= truemisseddiffers
    reflections.3.two_theta_deg= 50.45082, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.name= 111misseddiffers
    lines.0.multiplicity= 8misseddiffers
    lines.1.name= 200misseddiffers
    lines.1.multiplicity= 6misseddiffers
  3. r0003α 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 used
    packing_fraction0.680175 ± 6.8 × 10⁻¹⁰0.680175lockedunder 0.01 % of the tolerance used
    nearest_neighbour_A2.48246 ± 2.5 × 10⁻⁹2.48246lockedunder 0.01 % of the tolerance used
    coordination_number= 88lockedexact match
    d_A2.02692 ± 2 × 10⁻⁹2.02692lockedunder 0.01 % of the tolerance used
    two_theta_deg44.6716 ± 4.5 × 10⁻⁸44.6716lockedunder 0.01 % of the tolerance used
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= truemisseddiffers
    lines.0.name= 110misseddiffers
    lines.0.multiplicity= 12misseddiffers
  4. r0004simple 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 used
    nearest_neighbour_A3 ± 3 × 10⁻⁹3lockedunder 0.01 % of the tolerance used
    coordination_number= 66lockedexact match
    atoms_per_cell1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance used
    volume_A327 ± 2.7 × 10⁻⁸27lockedunder 0.01 % of the tolerance used
    allowed= truetruelockedexact match
    two_theta_deg29.7566 ± 3 × 10⁻⁸29.7566lockedunder 0.01 % of the tolerance used
    lines.0.name= 100misseddiffers
    lines.0.multiplicity= 6misseddiffers
  5. r0005ideal 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 used
    packing_fraction0.74048 ± 7.4 × 10⁻¹⁰0.74048lockedunder 0.01 % of the tolerance used
    nearest_neighbour_A3.2094 ± 3.2 × 10⁻⁹3.2094lockedunder 0.01 % of the tolerance used
    coordination_number= 1212lockedexact match
    volume_A346.7505 ± 4.7 × 10⁻⁸46.7505lockedunder 0.01 % of the tolerance used
    d_A2.62046 ± 2.6 × 10⁻⁹2.62046lockedunder 0.01 % of the tolerance used
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.d_A= 2.779422, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reflections.3.d_A= 2.455486, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reflections.3.allowed= truemisseddiffers
  6. r0006triclinic 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 used
    d_A1.45479 ± 1.5 × 10⁻⁹1.45479lockedunder 0.01 % of the tolerance used
    reciprocal.a_star_per_A= 0.25, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reciprocal.gamma_star_deg= 90, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  7. r0007rhombohedral 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 used
    d_A2.04124 ± 2 × 10⁻⁹2.04124lockedunder 0.01 % of the tolerance used
    reflections.1.d_A= 2.041241, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  8. r0008monoclinic 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 used
    d_A4.69846 ± 4.7 × 10⁻⁹4.69846lockedunder 0.01 % of the tolerance used
    reflections.1.d_A= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reflections.2.d_A= 6.577848, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reciprocal.beta_star_deg= 70, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reciprocal.a_star_per_A= 0.212836, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  9. r0009hexagonal 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 used
    d_A1.5 ± 1.5 × 10⁻⁹1.5lockedunder 0.01 % of the tolerance used
    reflections.1.d_A= 1.286239, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reciprocal.a_star_per_A= 0.3849, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    reciprocal.gamma_star_deg= 60, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
  10. r0010copper 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_A a_c³) = 8.935 g/cm³, volume 3 a_c^3/4, lines a_c/√3 (x₈) then a_c/2 (x₆); R rule -h+k+l = 3n: 001, 002, 100 absent, 003 and 101 present (rel 10⁻⁹)passed

    density_g_per_cm38.93529 ± 8.9 × 10⁻⁹8.93529lockedunder 0.01 % of the tolerance used
    volume_A335.4283 ± 3.5 × 10⁻⁸35.4283lockedunder 0.01 % of the tolerance used
    d_A2.08706 ± 2.1 × 10⁻⁹2.08706lockedunder 0.01 % of the tolerance used
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= falsemisseddiffers
    reflections.4.allowed= truemisseddiffers
    reflections.4.d_A= 2.087063, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.d_A= 2.087063, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.multiplicity= 8misseddiffers
    lines.1.d_A= 1.80745, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.1.multiplicity= 6misseddiffers
  11. r0011A-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 used
    allowed= truetruelockedexact match
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= truemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= falsemisseddiffers
    reflections.4.allowed= falsemisseddiffers
    reflections.5.allowed= falsemisseddiffers
    reflections.6.allowed= truemisseddiffers
    reflections.7.allowed= falsemisseddiffers
    lines.0.name= 100misseddiffers
    lines.0.multiplicity= 2misseddiffers
    lines.0.d_A= 4, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.two_theta_deg= 22.206193, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.1.name= 011misseddiffers
    lines.1.multiplicity= 4misseddiffers
    lines.1.d_A= 3.841106, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.name= 002misseddiffers
    lines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.multiplicity= 2misseddiffers
  12. r0012B-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 used
    allowed= truetruelockedexact match
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= truemisseddiffers
    reflections.3.allowed= falsemisseddiffers
    reflections.4.allowed= falsemisseddiffers
    reflections.5.allowed= truemisseddiffers
    reflections.6.allowed= falsemisseddiffers
    reflections.7.allowed= truemisseddiffers
    lines.0.name= 010misseddiffers
    lines.0.multiplicity= 2misseddiffers
    lines.0.d_A= 5, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.two_theta_deg= 17.724567, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.1.name= 101misseddiffers
    lines.1.multiplicity= 4misseddiffers
    lines.1.d_A= 3.328201, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.name= 002misseddiffers
    lines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.multiplicity= 2misseddiffers
  13. r0013C-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 used
    allowed= truetruelockedexact match
    reflections.0.allowed= truemisseddiffers
    reflections.1.allowed= falsemisseddiffers
    reflections.2.allowed= falsemisseddiffers
    reflections.3.allowed= truemisseddiffers
    reflections.4.allowed= truemisseddiffers
    reflections.5.allowed= falsemisseddiffers
    reflections.6.allowed= falsemisseddiffers
    reflections.7.allowed= falsemisseddiffers
    lines.0.name= 001misseddiffers
    lines.0.multiplicity= 2misseddiffers
    lines.0.d_A= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.0.two_theta_deg= 14.752363, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.1.name= 110misseddiffers
    lines.1.multiplicity= 4misseddiffers
    lines.1.d_A= 3.123475, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.name= 002misseddiffers
    lines.2.d_A= 3, within 1.000000 × 10⁻⁹ relativereading not recorded on this page
    lines.2.multiplicity= 2misseddiffers
13 of 13 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

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

NameUnitDefaultMeaning
structurecustomA one-element structure fixes system, centring and atom positions; custom takes them from system and centring.
systemcubicCrystal system. trigonal means rhombohedral axes (a, α); monoclinic has unique axis b.
centringPLattice 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_degdegCell angle α; leave out where the system fixes it.
beta_degdegCell angle β; leave out where the system fixes it.
gamma_degdegCell 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.5406Radiation wavelength; the default is Cu K-α₁.
two_theta_max_degdeg120Upper end of the powder pattern.
molar_mass_g_per_molg/molMolar mass of one formula unit (one atom for the named structures); gives the density.
formula_units1Formula units per cell (Z), for a custom cell with molar_mass_g_per_mol.
atomsThe cell contents instead of molar_mass_g_per_mol: atoms per cell of each kind with their molar masses.

Readings

NameUnitMeaning
a_AÅ
b_AÅ
c_AÅ
alpha_degdeg
beta_degdeg
gamma_degdeg
c_over_a1
volume_A3ų
reciprocalReciprocal cell (crystallographers' convention, no 2 π).
atoms_per_cell1
formula_units1
mass_per_cell_g_per_molg/molMass of one mole of cells.
density_g_per_cm3g/cm³Theoretical (X-ray) density; null without masses.
nearest_neighbour_AÅNamed structures only.
atomic_radius_AÅHalf the nearest-neighbour distance.
coordination_number1Atoms 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_fraction1Equal 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_degdegBragg 2 θ of the first plane in hkl; null when λ > 2d.
allowedWhether the first plane in hkl survives the reflection rule.
reflectionsOne row per plane in hkl; also out/reflections.csv.
n_lines1Powder lines below two_theta_max_deg.
first_line_two_theta_degdeg
linesFirst 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_completeFalse 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.

Terminal
MCP call