# Crystal display correction — Element Projection Lab 0.13.1

The user's visual criticism was correct: the previous display emphasized
similar-looking primitive parallelepiped cages and independently fitted each
to the same frame. This hid differences in physical size and local atom
arrangement. It also had only 67 compiled geometries, despite listing all 118
elements. This patch corrects the display without claiming new data coverage.

## What changed

- The default is now a local periodic environment: a central atom and nearby
  atomic sites, with the nearest-site distance in ångströms and a 1 Å scale bar.
- Primitive-cell and 27-cell views remain available, along with the explicitly
  mathematical 4D projection. A unit cell is a chosen repeating coordinate
  region, not the physical outside surface or habit of a crystal.
- Four simultaneous reference views show diamond carbon, BCC iron, FCC gold,
  and HCP magnesium on a shared physical scale. A shape-fit / shared-scale
  choice makes the scaling convention explicit in the large view.
- All 118 entries remain selectable. Coverage is explicitly 67 geometries and
  51 missing coordinate sets; missing entries are not drawn as invented cells.
- The downloadable periodic-table poster shows local arrangements rather than
  cell cages. Its tiny tile drawings fit the available space; nearest distances
  are printed instead of suggesting a shared physical scale.

## Why some similarities must remain

Among the 67 known reference phases, 22 are HCP, 20 FCC, 14 BCC, five
rhombohedral, three diamond, two body-centered tetragonal, and one simple
cubic. Elements within one family really can share the same normalized
arrangement. Gold, silver and copper remain FCC while their nearest distances
are about 2.8850, 2.8921 and 2.5527 Å. Giving each a unique decorative solid
would introduce a false difference.

For the selected reference data, the new view gives diamond carbon four nearby
sites, BCC iron eight, FCC gold twelve, HCP magnesium twelve, and simple-cubic
polonium six. The published source phase conditions and uncertainty limitations
remain intact. Carbon here is diamond; graphite is not silently substituted.

## Precise neighborhood definition

From primitive matrix A and basis coordinates b, relative positions are
`p = (n + b_j - b_0) A`, for integer translations n. The displayed neighbors
satisfy `0 < ||p|| <= 1.10 d_min`, where d_min is the smallest nonzero distance.
The central site is basis index 0 (labeled site 1 in the interface).

The 1.10 multiplier is a fixed visualization convention. It does not infer
chemical bonds or provide universal coordination numbers. Nonideal HCP can
split nearby distances; Mg includes two groups of six, while Cd's next group
lies outside this fixed cutoff. One site is shown per phase; other inequivalent
sites, including those in samarium, need not have identical neighborhoods.

Production enumeration starts with an upper bound on the nearest distance.
For any point within radius R, the i-th fractional coordinate has magnitude at
most R times the norm of column i of A inverse. Adding the bounded basis offset
therefore gives a complete finite set of integer images to inspect.

An independent implementation uses every integer image in [-6,6]^3 and checks
that all omitted images must have distance greater than 6 times the smallest
singular value of A. That bound exceeds the selected cutoff for every source
cell, by a minimum factor 2.981. Thus its finite enumeration covers the declared
neighborhood; this is not an assertion about infinitely many different cells.

## Verification and preservation

Independent replay verified 673 neighbor positions over all 67 environments.
Maximum position difference was 0 Å, and maximum distance difference was
4.44e-16 Å. It verified that all 118 original records and optical values are
unchanged and that all 51 unavailable environments remain null. Ten new
regression tests cover representative structures, nonideal HCP, skew cells,
changes of primitive basis, rotations, origin shifts, and invalid inputs.
The completed full regression run passed all 228 tests. Its authoritative log
is `outputs/release_0.13.1_test_log_retry.txt`; the earlier log ended without a
summary and is retained but is not counted as a completed run.

The existing 11 measured-input optical reconstructions are unchanged. This
patch does not turn them into predictions of optical constants from geometry,
and introduces no extra-dimensional dynamics. Theory revision 1.74 remains the
current scientific paper; this is a display patch to its crystal branch.

The previous display sources, poster, HTML, smoke result and modified metadata
are retained under `history/crystal_display_v0.13.0/`. Old source data, raw optical
tables, crystal atlas, numerical optical output and earlier claim records are
preserved. Browser and interaction verification details are stored with the
current display audit, separately from the old 633-check audit.
The current UI passes 1,459 native Canvas and generated-script interaction
checks, including every element selection and the four comparison views.
The 320/736-pixel Canvas previews and static poster were visually inspected.
Full browser CSS layout, touch targets, and the actual host iframe remain
unverified because a local browser binary is unavailable.

## Sources and next work

- [IUCr definition of unit cell](https://dictionary.iucr.org/Unit_cell).
- [AFLOW diamond structure, lattice and basis](https://aflow.org/p/A_cF8_227_a-001/).
- The ASE / AFLOW source versions, phase caveats and licenses remain those
  documented in `CRYSTAL_SOURCE_NOTES.md`; there are no new material inputs.

The incomplete entries require sourced phase-specific lattice vectors and
atomic bases before they can be added. Filling molecular and complex elemental
crystals is separate from making the existing 67 arrangements readable.
