## Phase 128: Kalika Materials Science Research Platform — Crystal Structure Visualization, Property Dashboards, Autonomous Materials Discovery Agents & Collaborative Research Workbench

The definitive materials science research environment. This phase builds
everything a materials scientist needs from first login to published paper:
interactive 3D crystal structure visualization (WebGPU-accelerated, matching
VESTA/CrystalMaker/Materials Studio quality), electronic structure visualization
(band structures, DOS, Fermi surfaces, charge densities), property dashboards
(phase diagrams, phonons, transport, elasticity), materials-specific
computational notebooks (extending Phase 105), autonomous discovery agents
(generate-screen-compute-validate loops), collaborative research infrastructure
(shared projects, provenance, publication output), experimental characterization
integration, a materials knowledge graph, educational onboarding, and
production-grade performance/scalability. Extends Phase 105 (Research Platform),
Phase 107 (UI/UX), and the broader materials stack in Phases 116-127, especially
Phases 119, 121, and 125. Technology split: TypeScript (~70%) for UI, notebooks,
dashboards, agents, knowledge graph, and orchestration; Rust (~15%) for WebGPU
3D rendering kernels, isosurface extraction, and large-structure LOD; Python
(~15%) for DFT/ML wrappers, database connectors, and validation scripts.

---

### 128.1 Scaffolding & Core Types (`@kalika/materials-platform`)

#### 128.1.1 Library Scaffolding

- [x] **128.1.1.1** Create `libs/kalika/materials-platform/` directory with
      `package.json`, `project.json`, `tsconfig.json`, and `src/index.ts` barrel
      export. Register path mapping `@kalika/materials-platform` in
      `tsconfig.base.json`
- [x] **128.1.1.2** Create Rust crate `libs/kalika/materials-platform/crate/`
      with `Cargo.toml` (dependencies: `wgpu`, `glam`, `bytemuck`, `naga`,
      `rayon`, `serde`, `napi-rs`), `src/lib.rs`, and napi-rs bindings for
      exposing GPU rendering pipeline to TypeScript
- [x] **128.1.1.3** Configure Nx `project.json` with targets: `build` (tsup +
      cargo build), `test` (vitest + cargo test), `lint` (eslint + clippy),
      `build:wasm` (wasm-pack for browser-side 3D rendering)
- [x] **128.1.1.4** Create Python integration layer
      `libs/kalika/materials-platform/python/` with `pyproject.toml` for
      Materials Project API, AFLOW REST, JARVIS-DFT connectors, and pymatgen
      interoperability utilities

#### 128.1.2 Core Type Definitions

- [x] **128.1.2.1** Define `MaterialsProject` type: top-level workspace
      containing name, description, list of `CrystalStructure` entries, list of
      `Calculation` records, `PropertyDashboard` configurations,
      `DiscoveryAgent` sessions, `ResearchNotebook` references, collaborator
      list with permission levels, creation/modification timestamps, and
      provenance metadata
- [x] **128.1.2.2** Define `CrystalStructure` type: lattice vectors (3x3
      matrix), fractional coordinates per site, atomic species per site, site
      symmetry labels, space group (Hermann-Mauguin and Hall symbols, IT
      number), magnetic moments per site, oxidation states per site, occupancy
      factors (for disordered structures), anisotropic displacement parameters
      (6 independent U_ij per site), and metadata (source CIF, provenance, tags)
- [x] **128.1.2.3** Define `Visualization3D` type: scene graph containing list
      of `AtomNode` (position, element, radius, color, transparency, label,
      thermal ellipsoid), `BondNode` (start/end atom indices, bond order,
      length, color, cylinder radius), `PolyhedronNode` (central atom, vertex
      atoms, face list, color, transparency), `UnitCellNode` (edges, axis
      labels), `IsosurfaceNode` (mesh vertices/normals/colors, isovalue), camera
      state (position, target, up, projection type, FOV), and lighting
      configuration
- [x] **128.1.2.4** Define `PropertyDashboard` type: dashboard layout (grid of
      panels), each panel containing a `DashboardWidget` (plot type, data
      source, axis configuration, color map, interactive callbacks), with
      support for linked interactions (click point in phase diagram → highlight
      structure in 3D viewer) and responsive layout specifications
- [x] **128.1.2.5** Define `DiscoveryAgent` type: agent configuration (goal
      description, element palette, property constraints, compute budget),
      execution state (idle, running, paused, completed), candidate list with
      scores, workflow DAG (generate → screen → compute → validate stages),
      logs, and human-in-the-loop checkpoint definitions
- [x] **128.1.2.6** Define `ResearchNotebook` type: extending Phase 105 notebook
      model with materials-specific cell types (structure cell, band structure
      cell, phase diagram cell, reaction energy cell, screening cell, comparison
      cell), materials-specific autocomplete dictionary, and template references
- [x] **128.1.2.7** Define `Calculation` type: input structure, method (DFT
      functional, pseudopotential, k-mesh, cutoff energy, convergence criteria),
      output (total energy, forces, stress, electronic structure, phonons),
      computational cost (CPU-hours, wall-time, memory peak), status (queued,
      running, completed, failed), and full provenance (code version, commit
      hash, machine, submission time)
- [x] **128.1.2.8** Define `MaterialsDatabase` type: interface for querying
      external databases (Materials Project, AFLOW, OQMD, JARVIS, ICSD, COD)
      with unified query schema: composition, space group, band gap range,
      formation energy range, property filters, pagination, and result caching

---

### 128.2 Crystal Structure Visualization (`@kalika/crystal-viewer`)

#### 128.2.1 Rendering Pipeline (WebGPU via wgpu-rs)

- [x] **128.2.1.1** Implement WebGPU rendering context initialization: adapter
      selection (high-performance GPU preferred), device/queue creation, swap
      chain configuration (sRGB, MSAA 4x), depth buffer, and fallback to WebGL2
      when WebGPU is unavailable — in Rust compiled to WASM via wasm-pack
- [x] **128.2.1.2** Implement instanced sphere rendering for atoms: single
      sphere mesh (icosphere subdivision level 3, ~640 triangles) rendered via
      GPU instancing with per-instance position, radius, and RGBA color —
      achieving 60fps for 10,000+ atoms on mid-range GPUs
- [x] **128.2.1.3** Implement instanced cylinder rendering for bonds: single
      cylinder mesh rendered with per-instance start/end positions, radius, and
      color, with hemispherical caps for smooth bond termination at atom
      surfaces
- [x] **128.2.1.4** Implement polygon mesh rendering for coordination polyhedra:
      convex hull computation from vertex atom positions, face normal
      calculation, per-face or per-polyhedron coloring with controllable
      transparency (order- independent transparency via weighted blended OIT)
- [x] **128.2.1.5** Implement Phong/PBR shading pipeline: ambient, diffuse,
      specular lighting with configurable light positions, material roughness/
      metalness for PBR mode, environment mapping for reflections, and shadow
      mapping (cascaded shadow maps for large structures)
- [x] **128.2.1.6** Implement atom picking via GPU ray casting: shoot ray from
      mouse position through view frustum, intersect with atom spheres (analytic
      ray-sphere intersection, not bounding box), return nearest hit atom with <
      1ms latency for structures up to 100,000 atoms using BVH acceleration
- [x] **128.2.1.7** Implement anti-aliasing: MSAA 4x as default, optional FXAA
      post-process for performance, and supersampling (render at 2x resolution)
      for publication-quality screenshots

#### 128.2.2 Representation Modes

- [x] **128.2.2.1** Implement ball-and-stick representation: atoms as spheres
      with radii proportional to covalent/ionic/van der Waals radius (user
      selectable, default covalent × 0.4), bonds as cylinders connecting bonded
      atoms, with automatic bond detection (sum of covalent radii + tolerance,
      default tolerance 0.45 angstrom) and manual bond addition/removal
- [x] **128.2.2.2** Implement space-filling representation: atoms as spheres at
      full van der Waals radii, no bonds displayed, overlap between atoms
      visible (useful for packing visualization), with optional slicing plane to
      show interior
- [x] **128.2.2.3** Implement polyhedral representation: identify coordination
      polyhedra (octahedra, tetrahedra, square planar, trigonal bipyramidal,
      etc.) by detecting nearest neighbors of selected central atoms (e.g., all
      Ti in TiO2), render as semi-transparent colored polyhedra with shared
      faces/edges highlighted, support for distortion indicators (polyhedral
      volume, quadratic elongation, bond angle variance)
- [x] **128.2.2.4** Implement wireframe representation: unit cell edges as
      lines, bonds as thin lines, atoms as small dots or not shown — minimal
      rendering for structural overview and performance with very large systems
- [x] **128.2.2.5** Implement mixed representation mode: different
      representation per atom selection (e.g., polyhedra for octahedral sites,
      ball-and-stick for framework atoms, space-filling for intercalant ions) —
      essential for complex structures like perovskites and zeolites
- [x] **128.2.2.6** Implement thermal ellipsoid rendering: anisotropic
      displacement parameters (ADPs, U_ij tensor) rendered as 3D ellipsoids
      (ORTEP style) at configurable probability level (50%, 90%, 99%), with
      principal axes shown as lines through the ellipsoid

#### 128.2.3 Atom & Bond Appearance

- [x] **128.2.3.1** Implement CPK coloring schemes: Jmol color table (118
      elements), VESTA color table, RasMol color table, and custom per-element
      color assignment with color picker — stored as named color schemes that
      can be saved and shared
- [x] **128.2.3.2** Implement element-based atom sizing: lookup tables for
      atomic radius, ionic radius (by oxidation state and coordination number),
      covalent radius, and van der Waals radius from published crystallographic
      data (e.g., Shannon ionic radii, Cordero covalent radii)
- [x] **128.2.3.3** Implement atom transparency control: per-atom or per-element
      alpha, useful for highlighting subsurface atoms or de-emphasizing
      framework atoms while focusing on guest molecules
- [x] **128.2.3.4** Implement selection highlighting: selected atoms rendered
      with glowing outline (bloom post-process on selected atoms), different
      selection colors for primary/secondary/tertiary selections, and selection
      info panel showing element, position, distances to neighbors
- [x] **128.2.3.5** Implement atom labels: element symbol, site index, Wyckoff
      position, charge state (e.g., Fe3+), custom text — rendered as billboarded
      SDF text in 3D space with configurable font size, offset, and visibility
      threshold (hide labels when zoomed out past a distance)
- [x] **128.2.3.6** Implement bond order visualization: single bonds as single
      cylinder, double bonds as two parallel cylinders, triple bonds as three
      cylinders in triangular arrangement, aromatic bonds as dashed cylinder —
      bond order inferred from bond length tables or specified manually
- [x] **128.2.3.7** Implement bond length labels: display bond length in
      angstroms as 3D text at bond midpoint, togglable per-bond or globally,
      formatted to 3 decimal places, with lines connecting label to bond

#### 128.2.4 Unit Cell & Supercell

- [x] **128.2.4.1** Implement unit cell display: parallelepiped edges drawn as
      lines with configurable thickness and color, lattice parameter labels (a,
      b, c, alpha, beta, gamma) positioned along edges, origin marker, and
      colored axis vectors (a=red, b=green, c=blue) with arrowheads
- [x] **128.2.4.2** Implement supercell visualization: generate NxMxL supercell
      (user-specified repetitions along a, b, c), render with periodic boundary
      handling (atoms at cell faces appear on both sides), selective display
      (show only atoms within a distance cutoff from a selected point), and
      supercell boundary edges
- [x] **128.2.4.3** Implement conventional vs. primitive cell toggle: convert
      between primitive and conventional cell representations, display both
      simultaneously (primitive cell highlighted within conventional), and
      support for non-standard cell choices

#### 128.2.5 Symmetry & Planes

- [x] **128.2.5.1** Implement symmetry element visualization: rotation axes (C2,
      C3, C4, C6) as colored rods through the structure, mirror planes as semi-
      transparent rectangles, inversion centers as special markers, screw axes
      with helical indicator, glide planes with directional arrow — all derived
      from the space group operations
- [x] **128.2.5.2** Implement Miller plane visualization: given (hkl) indices,
      compute and render the crystallographic plane as a semi-transparent
      colored surface intersecting the unit cell, with plane normal vector
      shown, d- spacing labeled, and support for displaying families of parallel
      planes {hkl}
- [x] **128.2.5.3** Implement Brillouin zone overlay: compute first Brillouin
      zone from reciprocal lattice vectors (Wigner-Seitz cell in reciprocal
      space), render as wireframe overlaid on crystal structure (with
      appropriate scaling), label high-symmetry points (Gamma, X, M, K, L, etc.)

#### 128.2.6 Defect & Surface Visualization

- [x] **128.2.6.1** Implement vacancy visualization: missing atom site shown as
      transparent sphere with dashed outline or X marker, with surrounding atoms
      showing relaxation vectors (arrows indicating displacement from ideal
      positions)
- [x] **128.2.6.2** Implement interstitial visualization: extra atom highlighted
      with distinct color/glow, with distance measurements to nearest lattice
      sites automatically displayed
- [x] **128.2.6.3** Implement substitutional defect visualization: substituted
      atom rendered with different color and size from host atom, with optional
      side-by-side comparison showing original vs. defective structure
- [x] **128.2.6.4** Implement surface slab visualization: slab model with vacuum
      region, surface termination atoms colored distinctly, surface normal
      indicator, layer-by-layer coloring (surface, subsurface, bulk-like), and
      adsorbed molecule rendering with adsorption site geometry highlighted

#### 128.2.7 Camera & Interaction

- [x] **128.2.7.1** Implement orbital camera controls: arcball rotation (rotate
      around structure center), pan (translate camera), zoom (dolly in/out with
      scroll wheel, pinch on touch), with smooth inertial damping and
      configurable sensitivity
- [x] **128.2.7.2** Implement perspective/orthographic toggle: perspective
      projection for natural 3D appearance, orthographic for accurate structural
      comparison and measurement, with smooth animated transition between modes
- [x] **128.2.7.3** Implement preset crystal orientations: one-click views along
      [100], [010], [001], [110], [111], [1-10] directions, with smooth animated
      camera transition (spherical linear interpolation of quaternion
      orientation)
- [x] **128.2.7.4** Implement measurement tools: click two atoms to measure
      distance (angstroms), click three atoms to measure angle (degrees), click
      four atoms to measure dihedral angle, with persistent measurement
      annotations displayed in 3D scene

#### 128.2.8 Animation & Export

- [x] **128.2.8.1** Implement phonon mode animation: displace atoms according to
      phonon eigenvector at selected q-point and branch, animate sinusoidal
      oscillation with configurable amplitude and speed, support for
      superposition of multiple modes, and freeze-frame export at specific phase
- [x] **128.2.8.2** Implement MD trajectory playback: load trajectory frames
      (positions per timestep), play/pause/scrub with frame slider, adjustable
      playback speed, trail rendering (show atom paths over N frames), and
      on-the-fly RDF/MSD computation during playback
- [x] **128.2.8.3** Implement NEB path animation: render minimum energy path
      between initial and final structures, interpolate intermediate images,
      animate transition with energy profile overlay, highlight breaking/forming
      bonds during transition
- [x] **128.2.8.4** Implement PNG export: render current view at configurable
      resolution (up to 8K for publication), with transparent background option,
      embedded scale bar, and crystal axis indicator
- [x] **128.2.8.5** Implement SVG export: convert 3D scene to 2D vector graphics
      via painter's algorithm (depth-sorted rendering), with atom circles, bond
      lines, and labels as editable SVG elements — for journal figure
      preparation in Illustrator/Inkscape
- [x] **128.2.8.6** Implement glTF 3D model export: export full scene as glTF
      2.0 binary (.glb) for import into Blender, PowerPoint, or web 3D viewers,
      with PBR materials and animation data preserved
- [x] **128.2.8.7** Implement POV-Ray scene export: generate POV-Ray scene
      description file for photorealistic ray-traced rendering, with material
      definitions, lighting setup, and camera matching the current viewport

#### 128.2.9 Notebook Integration

- [x] **128.2.9.1** Implement inline 3D viewer in Phase 105 notebooks: embed
      interactive crystal structure viewer as a notebook cell output, with full
      rotation/zoom/pick capabilities within the notebook, synchronized with
      structure data in code cells
- [x] **128.2.9.2** Implement structure editing in notebook cells: click-to-add
      atoms, drag-to-move atoms, delete atoms, modify species — edits reflected
      back to the code cell's structure variable, enabling interactive structure
      manipulation within the reactive notebook paradigm

---

### 128.3 Electronic Structure Visualization (`@kalika/electronic-viz`)

#### 128.3.1 Band Structure Plots

- [x] **128.3.1.1** Implement band structure plot renderer: plot E(k) along
      high- symmetry path with automatic k-path detection from space group
      (using Setyawan-Curtarolo conventions), vertical lines at high-symmetry
      points with labels (Gamma, X, M, etc.), Fermi level as horizontal dashed
      line, energy axis with configurable range and units (eV, Ry, Ha)
- [x] **128.3.1.2** Implement fat band rendering: color each band segment by
      orbital character (s=red, p=green, d=blue, f=orange or user-defined), with
      line width proportional to projection weight (0-1), and legend showing
      orbital-color mapping — essential for understanding electronic character
- [x] **128.3.1.3** Implement spin-resolved band structure: separate panels for
      spin-up and spin-down channels, or overlaid with different colors/line
      styles, with exchange splitting visualization and spin-polarization energy
      labeled
- [x] **128.3.1.4** Implement non-collinear spin texture visualization: band
      structure colored by spin expectation value component (S_x, S_y, S_z),
      with spin arrows on band points for Rashba/Dresselhaus systems
- [x] **128.3.1.5** Implement band structure comparison overlay: plot band
      structures from multiple calculations (different functionals, different
      structures) on the same axes with different colors/line styles, automatic
      alignment by Fermi level or vacuum level, and difference highlighting
- [x] **128.3.1.6** Implement interactive band structure: hover over any point
      to show tooltip with eigenvalue (eV), k-point (fractional coordinates and
      label), orbital decomposition (% s, p, d, f), and band index; click to
      highlight that band across the entire path

#### 128.3.2 Density of States

- [x] **128.3.2.1** Implement total DOS plot: g(E) vs. E with configurable
      Gaussian/Lorentzian broadening (sigma parameter), Fermi level marker, fill
      below curve (occupied states shaded), and configurable energy range
- [x] **128.3.2.2** Implement atom-projected DOS (PDOS): stacked area plot or
      overlaid line plots of DOS contribution from each atom or atom group, with
      color per element type, and interactive toggle to show/hide individual
      atom contributions
- [x] **128.3.2.3** Implement orbital-projected DOS: decompose PDOS into orbital
      contributions (s, p_x, p_y, p_z, d_xy, d_yz, d_xz, d_x2-y2, d_z2, and f
      orbitals), with stacked area or individual line plots per orbital
- [x] **128.3.2.4** Implement spin-resolved DOS: spin-up plotted positive, spin-
      down plotted negative (mirror plot), with net spin polarization
      highlighted and magnetic moment integration displayed
- [x] **128.3.2.5** Implement interactive DOS-structure linking: click on energy
      point in DOS → highlight atoms in 3D crystal viewer that contribute most
      at that energy, with opacity proportional to contribution weight

#### 128.3.3 Fermi Surface Visualization

- [x] **128.3.3.1** Implement Fermi surface extraction: from eigenvalues on a
      regular k-grid, extract isosurface at E_F using marching cubes algorithm
      (Rust implementation for performance), with configurable grid density and
      interpolation (trilinear or Fourier)
- [x] **128.3.3.2** Implement Fermi surface rendering: 3D isosurface colored by
      scalar field (Fermi velocity magnitude, effective mass, spin component),
      with Brillouin zone wireframe overlay, high-symmetry point labels, and
      multiple sheets (one per band crossing E_F) rendered with different colors
- [x] **128.3.3.3** Implement Fermi surface interaction: orbital camera
      rotation, interactive slicing plane (drag plane through BZ, show 2D
      cross-section), sheet visibility toggles, and color map selection
- [x] **128.3.3.4** Implement Fermi surface property mapping: color surface by
      group velocity (gradient of E(k)), effective mass tensor eigenvalues,
      electron-phonon coupling strength lambda_nk, or superconducting gap
      Delta_nk, with continuous color scale and histogram of mapped values

#### 128.3.4 Charge Density & Orbital Visualization

- [x] **128.3.4.1** Implement 3D charge density isosurface: load volumetric data
      (CHGCAR, cube file format), extract isosurface at user-selected isovalue
      via marching cubes (Rust), render as semi-transparent surface with color
      mapped to local value, isovalue slider for real-time isosurface update
- [x] **128.3.4.2** Implement 2D charge density cross-section: slice volumetric
      data along any crystallographic plane (hkl) or arbitrary plane defined by
      three points, render as color-mapped 2D image overlaid on the crystal
      structure, with contour lines at configurable intervals
- [x] **128.3.4.3** Implement charge density difference visualization: compute
      delta_rho = rho_compound - rho_A - rho_B (bonding charge redistribution),
      display positive (charge accumulation, blue) and negative (charge
      depletion, red) isosurfaces simultaneously for chemical bonding analysis
- [x] **128.3.4.4** Implement spin density visualization: render magnetization
      density m(r) = rho_up(r) - rho_down(r) isosurface, positive (majority
      spin) and negative (minority spin) in different colors, for magnetic
      structure analysis
- [x] **128.3.4.5** Implement ELF (Electron Localization Function)
      visualization: ELF isosurface rendering with values ranging 0-1, highlight
      covalent bonds (ELF ~ 0.8-1.0), lone pairs, metallic bonding (ELF ~ 0.5),
      with isovalue slider
- [x] **128.3.4.6** Implement Wannier function visualization: load Wannier90
      output, render real-space Wannier function isosurface (positive/negative
      lobes in different colors), display Wannier center positions on crystal
      structure, and spread (Omega) values per Wannier function

---

### 128.4 Property Visualization Dashboards (`@kalika/materials-dashboard`)

#### 128.4.1 Phase Diagram Explorer

- [x] **128.4.1.1** Implement binary phase diagram renderer: composition axis
      (x=0 to x=1 for A\_{1-x}B_x), formation energy axis, convex hull as solid
      line connecting stable phases, unstable phases as points above hull with
      energy-above-hull labeled, and clickable phase points showing structure
      details
- [x] **128.4.1.2** Implement ternary phase diagram renderer: equilateral
      triangle with composition axes (A, B, C corners), convex hull projected as
      colored regions, tie lines connecting coexisting phases, and interactive
      click-on-composition to show stable phase assemblage and reaction energies
- [x] **128.4.1.3** Implement convex hull visualization: 3D convex hull
      (composition + energy) for ternary systems with interactive rotation,
      facet coloring by stability region, and mouse-over showing hull distance
      for any composition
- [x] **128.4.1.4** Implement energy-above-hull heatmap: for ternary systems,
      render a 2D heatmap of E_above_hull(x_A, x_B) over the composition
      triangle, with color scale from green (stable, E=0) to red (unstable, E >
      threshold), and contour lines
- [x] **128.4.1.5** Implement temperature-dependent phase diagram integration:
      connect to Phase 125 CALPHAD data, render binary/ternary phase diagrams
      with temperature as vertical axis (binary) or slider (ternary), showing
      liquidus, solidus, solvus lines, invariant reactions (eutectic,
      peritectic, eutectoid), and two-phase regions labeled
- [x] **128.4.1.6** Implement Pourbaix diagram renderer: plot stability regions
      in pH vs. electrode potential (E) space for aqueous electrochemistry, with
      regions labeled by stable phase (metal, oxide, dissolved ion), phase
      boundaries as lines, and water stability window overlay (H2/O2 evolution
      lines)

#### 128.4.2 Phonon Visualization Dashboard

- [x] **128.4.2.1** Implement phonon dispersion dashboard widget: interactive
      phonon band structure plot (extending Phase 119 data), with fat bands
      colored by atom contribution (which atoms move most in each mode), branch
      highlighting on hover, and linked animation (click mode → animate in 3D
      crystal viewer)
- [x] **128.4.2.2** Implement phonon DOS dashboard widget: total +
      atom-projected phonon DOS, with energy axis linked to dispersion plot
      (horizontal line synced between panels), and thermodynamic integral
      readouts (zero-point energy, thermal energy at selected T)
- [x] **128.4.2.3** Implement animated phonon mode viewer: select mode from
      dispersion plot, animate atomic displacements in 3D crystal viewer with
      amplitude and speed controls, display mode symmetry label and frequency
- [x] **128.4.2.4** Implement thermal property plots: C_v(T), entropy S(T),
      Helmholtz free energy F(T), mean square displacement <u^2>(T) computed
      from phonon DOS via standard statistical mechanics integrals, with
      multiple materials overlaid for comparison
- [x] **128.4.2.5** Implement Grueneisen parameter dispersion: plot mode
      Grueneisen parameter gamma_i(q) along high-symmetry path, color-coded by
      sign (positive=normal, negative=NTE), with volume-averaged Grueneisen
      parameter and thermal expansion coefficient displayed

#### 128.4.3 Transport Property Dashboard

- [x] **128.4.3.1** Implement thermoelectric property plots: electrical
      conductivity sigma(T), Seebeck coefficient S(T), electronic thermal
      conductivity kappa_e(T), and figure of merit ZT(T) as function of
      temperature, computed from Boltzmann transport and thermodynamic data
      (Phases 123/125), with configurable carrier concentration (n-type/p-type
      doping slider)
- [x] **128.4.3.2** Implement carrier concentration optimization view: plot ZT
      vs. carrier concentration at fixed temperature, identify optimal doping
      level with peak marker, and show trade-off between sigma and S (Pisarenko
      plot)
- [x] **128.4.3.3** Implement multi-material transport comparison: overlay
      transport properties of multiple materials on same axes (e.g., compare
      Bi2Te3, PbTe, SnSe, SiGe), with material legend and property ranking table
- [x] **128.4.3.4** Implement thermal conductivity breakdown: plot total
      kappa(T) decomposed into electronic (kappa_e) and lattice (kappa_L)
      contributions, with individual phonon branch contributions to kappa_L
      (acoustic vs. optical), and cumulative kappa_L vs. mean free path for
      nanostructuring guidance

#### 128.4.4 Spectroscopy Comparison Dashboard

- [x] **128.4.4.1** Implement theory-experiment overlay: upload experimental
      spectrum (CSV: energy/frequency vs. intensity), overlay with computed
      spectrum, with alignment tools (shift, scale, broadening adjustment),
      residual plot, and R-factor (agreement metric) computation
- [x] **128.4.4.2** Implement multi-method comparison: plot spectra from
      DFT-PBE, DFT-HSE, GW, BSE, or ML predictions on same axes, with method
      labels and color coding, to assess theoretical method accuracy
- [x] **128.4.4.3** Implement peak annotation: automatic peak detection (local
      maxima above threshold), assignment to electronic transitions or phonon
      modes, clickable annotations linking to underlying electronic structure or
      phonon mode in other dashboard panels

#### 128.4.5 Elastic Property Visualization

- [x] **128.4.5.1** Implement directional Young's modulus surface: compute E(n)
      = 1 / (s\_{ijkl} n_i n_j n_k n_l) for all directions n on the unit sphere,
      render as 3D representation surface (radius = E(n)) colored by magnitude,
      with crystal axes overlay — revealing elastic anisotropy at a glance
- [x] **128.4.5.2** Implement elastic anisotropy indicators: compute and display
      Zener ratio A = 2C44/(C11-C12), universal anisotropy index A^U, and
      Ranganathan-Ostoja-Starzewski log-Euclidean anisotropy — with visual
      comparison to isotropic reference
- [x] **128.4.5.3** Implement elastic wave velocity surfaces: compute phase
      velocity v(n) and group velocity for longitudinal and transverse acoustic
      waves in all directions from Christoffel equation eigenvalues, render as
      3D velocity surfaces with polarization indicators

#### 128.4.6 Magnetic Structure Dashboard

- [x] **128.4.6.1** Implement spin arrow rendering: display magnetic moment
      vectors as 3D arrows on atomic sites, with arrow length proportional to
      moment magnitude, color by component (collinear: up=red, down=blue), and
      configurable arrow size/style
- [x] **128.4.6.2** Implement non-collinear spin texture visualization: render
      spin vectors with arbitrary orientations, color by polar/azimuthal angle,
      support for spin spirals (show pitch, chirality), and skyrmion textures
      (topological charge computation)
- [x] **128.4.6.3** Implement magnon dispersion dashboard: plot magnon (spin
      wave) frequency vs. q-point along high-symmetry path, with intensity
      coloring from spin-spin structure factor, linked to real-space spin wave
      animation

---

### 128.5 Materials Science Notebooks (`@kalika/materials-notebooks`)

#### 128.5.1 Materials-Specific Cell Types

- [x] **128.5.1.1** Implement structure cell: notebook cell containing an
      interactive 3D crystal structure viewer (using @kalika/crystal-viewer),
      with inline editing capabilities (add/move/delete atoms, change species),
      structure saved as CIF or POSCAR within the cell, and bidirectional sync
      with code variables in adjacent cells
- [x] **128.5.1.2** Implement band structure cell: configure calculation
      parameters (functional, k-path, energy range), execute band structure
      computation (via @kalika/electronic-structure or external code), and
      display interactive band structure plot with fat bands and DOS side panel
      — all within a single notebook cell
- [x] **128.5.1.3** Implement phase diagram cell: interactive composition
      explorer where user clicks on composition space, system queries database
      or runs calculation for stability at that composition, and progressively
      builds up a phase diagram with each query — combining exploration and
      computation
- [x] **128.5.1.4** Implement reaction energy cell: define chemical reaction
      (reactants → products with stoichiometric coefficients), automatically
      look up or compute energies for all phases, compute reaction
      enthalpy/Gibbs energy, display reaction energy diagram with transition
      states if available
- [x] **128.5.1.5** Implement screening cell: define property filters (band gap
      range, formation energy < threshold, element constraints), execute high-
      throughput screening pipeline across a database or generated candidates,
      display results as interactive table with sorting, filtering, and
      click-to- view-structure
- [x] **128.5.1.6** Implement comparison cell: side-by-side comparison of two or
      more materials — synchronized 3D viewers, overlaid property plots (band
      structure, DOS, phonons), property table with delta values, and radar
      chart for multi-property comparison

#### 128.5.2 Smart Autocomplete & Context

- [x] **128.5.2.1** Implement material name autocomplete: as user types a
      composition (e.g., "BaTiO"), suggest matching materials from databases
      (BaTiO3 perovskite, Ba2TiO4, etc.) with space group and key properties,
      and auto-fetch structure on selection
- [x] **128.5.2.2** Implement element symbol context: typing an element symbol
      (e.g., "Ti") triggers a context popup showing atomic number, electron
      configuration, common oxidation states, electronegativity, ionic radii,
      and links to property entries — immediate reference without leaving the
      notebook
- [x] **128.5.2.3** Implement workflow suggestion engine: based on current
      notebook content (e.g., "you have a structure and band structure — would
      you like to compute phonons, elastic constants, or defect formation
      energies next?"), suggest next computational steps with one-click cell
      insertion
- [x] **128.5.2.4** Implement input parameter validation: when configuring a
      calculation cell, validate parameters in real-time (k-mesh density
      sufficient for convergence, cutoff energy appropriate for pseudopotential,
      smearing width reasonable for insulator vs. metal), with warnings and
      suggested corrections

#### 128.5.3 Template Notebooks

- [x] **128.5.3.1** Implement "Battery material screening" template: structure
      input → stability assessment → voltage calculation (intercalation energy)
      → ion migration barrier (NEB) → volume change on cycling → screening
      summary dashboard, pre-populated with explanatory markdown cells and
      parameter suggestions for common chemistries (Li-ion, Na-ion, Mg-ion)
- [x] **128.5.3.2** Implement "Thermoelectric optimization" template: structure
      input → electronic structure (band gap, effective mass) → Boltzmann
      transport (sigma, S, kappa_e) → phonon calculation (kappa_L) → ZT
      computation → doping optimization → comparison with known thermoelectrics
- [x] **128.5.3.3** Implement "Catalyst design" template: surface slab
      generation → adsorption energy calculations (key intermediates) → scaling
      relations → volcano plot → selectivity analysis → stability assessment
      (dissolution potential, surface energy)
- [x] **128.5.3.4** Implement "Defect engineering" template: host structure →
      point defect generation (vacancies, interstitials, substitutionals) →
      defect formation energy calculation → charge transition level diagram →
      defect concentration vs. Fermi level → optical transition energies
- [x] **128.5.3.5** Implement "2D material discovery" template: bulk structure →
      exfoliation energy calculation → monolayer optimization → electronic
      structure → mechanical properties (in-plane stiffness, Poisson ratio) →
      optical absorption → stability assessment (phonon, AIMD)
- [x] **128.5.3.6** Implement "Alloy phase diagram" template: define composition
      space → SQS structure generation → total energy calculations → cluster
      expansion fitting → Monte Carlo thermodynamics → phase diagram
      construction → ordering temperature identification

#### 128.5.4 Inline Computation & Caching

- [x] **128.5.4.1** Implement inline DFT computation: execute DFT calculations
      (single-point, relaxation, band structure, DOS) directly from notebook
      cells, routing to local or remote compute resources (Phase 128.10), with
      progress bar showing SCF convergence in real time
- [x] **128.5.4.2** Implement inline ML prediction: run ML property predictions
      (CGCNN, MEGNet, M3GNet, ALIGNN from Phase 121) directly from notebook
      cells, with instant results and uncertainty quantification displayed as
      error bars or confidence intervals
- [x] **128.5.4.3** Implement results caching: hash-based cache keyed on
      structure (Niggli-reduced cell + sorted sites) + method parameters, avoid
      recomputation for previously calculated structure/method combinations,
      cache stored locally and optionally shared across team workspace

---

### 128.6 Autonomous Materials Discovery Agents (`@kalika/discovery-agents`)

#### 128.6.1 Structure Generation Agent

- [x] **128.6.1.1** Implement prototype substitution engine: given target
      composition and element constraints, search ICSD/AFLOW prototype database,
      identify matching prototypes (same stoichiometry type), substitute
      elements while respecting ionic radius ratios and electronegativity
      differences, rank candidates by Goldschmidt tolerance factor and radius
      ratio rules
- [x] **128.6.1.2** Implement evolutionary structure generation: genetic
      algorithm for crystal structure prediction — population of random
      structures, crossover (slab cut-and-splice), mutation (atom displacement,
      lattice strain, permutation), selection by fitness (computed energy), with
      convergence detection and diversity maintenance (niching)
- [x] **128.6.1.3** Implement generative model integration: connect to Phase 121
      generative models (diffusion, flow matching) for neural structure
      generation, with conditional generation on target properties (band gap,
      formation energy), and diversity sampling to avoid mode collapse
- [x] **128.6.1.4** Implement structure validity filtering: Pauling's rules
      checker (coordination number vs. radius ratio, electrostatic valence sum,
      edge/face sharing restrictions), charge neutrality verification (sum of
      oxidation states = 0), minimum interatomic distance check (no atom
      overlap), and space group consistency validation

#### 128.6.2 Stability Assessment Agent

- [x] **128.6.2.1** Implement thermodynamic stability assessment: compute
      formation energy relative to elemental references, query/compute convex
      hull for the relevant chemical system, determine energy above hull
      (E_hull), classify as stable (E_hull = 0), metastable (E_hull < threshold,
      e.g., 50 meV/atom), or unstable — with uncertainty propagation from DFT
      errors
- [x] **128.6.2.2** Implement dynamic (phonon) stability check: compute phonon
      dispersion at Gamma point (fast) or full BZ (thorough), check for
      imaginary frequencies (soft modes indicating structural instability),
      report unstable mode character (which atoms, which direction), suggest
      distortion along soft mode eigenvector to find stable structure
- [x] **128.6.2.3** Implement mechanical stability check: compute elastic
      constant tensor C_ij, verify Born stability criteria (positive definite
      C_ij for the crystal system: e.g., cubic requires C11>0, C44>0, C11>|C12|,
      C11+2C12>0), report which criterion fails and by how much
- [x] **128.6.2.4** Implement AIMD stability check: run short ab initio
      molecular dynamics (e.g., 5 ps at target temperature), monitor for
      structural decomposition (bond breaking, phase separation), amorphization
      (loss of long-range order via Lindemann criterion), or phase transition
      (symmetry change) — report pass/fail with trajectory visualization

#### 128.6.3 Property Prediction Agent

- [x] **128.6.3.1** Implement property routing engine: given a target property
      (band gap, formation energy, elastic moduli, thermal conductivity, etc.)
      and accuracy requirement, select the optimal prediction method: fast ML
      model (ms, ~0.3 eV MAE for band gap), semi-empirical (seconds, ~0.2 eV),
      DFT-PBE (minutes-hours, ~0.5 eV systematic error), or hybrid functional/GW
      (hours-days, ~0.1 eV) — trading off speed vs. accuracy
- [x] **128.6.3.2** Implement ML-DFT cross-validation: when ML model prediction
      uncertainty exceeds threshold, automatically trigger DFT calculation for
      validation, compare ML vs. DFT result, and flag cases where ML is
      unreliable (out-of-distribution structures), feeding back to active
      learning loop
- [x] **128.6.3.3** Implement multi-property prediction: given a material,
      predict an ensemble of properties simultaneously (band gap, formation
      energy, elastic moduli, Debye temperature, dielectric constant), using
      appropriate models for each, and present results as a property card with
      confidence intervals
- [x] **128.6.3.4** Implement property trend analysis: across a set of candidate
      materials, identify structure-property correlations (e.g., band gap
      increases with electronegativity difference), visualize as scatter plots
      with regression lines, and highlight outliers for further investigation

#### 128.6.4 Literature Search Agent

- [x] **128.6.4.1** Implement materials database search: query Materials Project
      API (mp-api), AFLOW REST API, JARVIS-DFT API, OQMD API for existing data
      on a composition or structure, unify results into standard format, and
      report: known phases, measured/computed properties, and references
- [x] **128.6.4.2** Implement literature search: given a composition or
      structure type, search arXiv (cond-mat, materials science), Google
      Scholar, and journal APIs (APS, ACS, Elsevier) for prior publications,
      extract key findings (experimental properties, synthesis conditions), and
      generate a concise literature summary with citations
- [x] **128.6.4.3** Implement similar materials finder: given a target material,
      find structurally similar materials (same space group, similar lattice
      parameters), compositionally similar (isoelectronic substitutions), and
      functionally similar (similar band gap, similar elastic properties) — for
      analogy-based property prediction and inspiration
- [x] **128.6.4.4** Implement prior art check: before proposing a "new"
      material, verify it hasn't been previously reported in databases or
      literature, including structural polymorphs and solid solutions, to avoid
      redundant discovery claims

#### 128.6.5 Synthesis Feasibility Agent

- [x] **128.6.5.1** Implement thermodynamic synthesis assessment: given target
      material and precursors, compute reaction Gibbs energy at synthesis
      conditions (temperature, pressure, atmosphere), check if target is
      thermodynamically accessible, and identify competing phases that might
      form instead
- [x] **128.6.5.2** Implement synthesis route suggestion: based on target
      material chemistry, suggest appropriate synthesis methods (solid-state
      reaction, sol-gel, co-precipitation, hydrothermal, CVD, MBE, sputtering),
      with recommended precursors, temperatures, atmospheres, and time scales —
      using rules from synthesis databases (e.g., text-mined recipes from
      literature)
- [x] **128.6.5.3** Implement synthesis temperature estimation: from phase
      diagram data (Phase 125), estimate minimum synthesis temperature (lowest T
      where target phase is stable and kinetically accessible), melting point
      prediction, and decomposition temperature — with confidence intervals
- [x] **128.6.5.4** Implement earth-abundance and cost scoring: given a
      composition, compute elemental abundance score (Clarke number weighted),
      raw material cost estimate (from USGS commodity data), toxicity flags (Cd,
      Pb, Tl, Be, As, Hg), and supply chain risk indicators (critical minerals
      list) — essential for practical material selection

#### 128.6.6 Multi-Agent Orchestration

- [x] **128.6.6.1** Implement discovery loop orchestrator: coordinate the full
      generate → screen → compute → validate → report pipeline across agents,
      with configurable pipeline stages, conditional branching (skip expensive
      DFT if ML predicts E_hull > 200 meV), and parallel execution of
      independent stages
- [x] **128.6.6.2** Implement human-in-the-loop checkpoints: at configurable
      pipeline stages (e.g., after initial screening, before expensive DFT),
      pause and present candidate summary to researcher for approval/rejection/
      modification, with suggested actions and risk assessment
- [x] **128.6.6.3** Implement compute budget management: track cumulative
      computational cost (CPU-hours for DFT, GPU-hours for ML, API calls for
      database queries), enforce budget limits per discovery session, prioritize
      candidates by expected information gain per compute cost (active learning
      acquisition function)
- [x] **128.6.6.4** Implement progress reporting and visualization: real-time
      dashboard showing discovery pipeline status, candidate count at each stage
      (funnel visualization), property distribution of surviving candidates,
      computation queue status, and estimated time to completion
- [x] **128.6.6.5** Implement candidate ranking engine: multi-objective ranking
      of candidates using Pareto frontier analysis (e.g., optimize both ZT and
      stability simultaneously), weighted scoring with user-defined property
      importance weights, and uncertainty-aware ranking (candidates with high
      predicted value but high uncertainty ranked for further computation)

#### 128.6.7 Goal-Directed Discovery

- [x] **128.6.7.1** Implement natural language goal parser: parse discovery
      goals like "Find a material with ZT > 2 at 600K containing earth-abundant
      elements" into structured constraints: target property (ZT), threshold (>
      2), condition (T=600K), element filter (earth-abundant), with
      disambiguation dialog for ambiguous goals
- [x] **128.6.7.2** Implement constraint-to-workflow compiler: given structured
      constraints, generate an optimal discovery workflow: choose element
      palette, select structure prototypes, configure screening filters, select
      property prediction methods, define validation criteria — outputting a
      complete executable pipeline
- [x] **128.6.7.3** Implement "stable oxide semiconductor" discovery preset:
      pre-configured goal for finding stable oxide materials with band gap
      1.5-3.0 eV, including element selection (Ti, Zn, Sn, In, Ga, etc.),
      structure prototypes (perovskite, spinel, delafossite, bixbyite), and
      screening criteria (E_hull < 25 meV/atom, no imaginary phonons)
- [x] **128.6.7.4** Implement "Li-ion conductor" discovery preset:
      pre-configured goal for solid electrolyte discovery, with constraints on
      ionic conductivity (sigma_Li > 1 mS/cm at 300K), electrochemical window (>
      4V vs. Li/Li+), mechanical stability, and air/moisture stability
- [x] **128.6.7.5** Implement "high-entropy alloy" discovery preset: search for
      single-phase HEA compositions in 4-6 element spaces, with screening by
      Hume-Rothery rules (atomic size difference < 6.6%, electronegativity
      difference, VEC range), CALPHAD phase stability, and target mechanical
      properties (hardness, ductility)
- [x] **128.6.7.6** Implement discovery report generation: at pipeline
      completion, generate comprehensive report including: top candidates with
      properties, crystal structures (3D visualizations), stability analysis,
      synthesis recommendations, comparison with known materials, and literature
      context — formatted for research group presentation or publication SI

---

### 128.7 Collaborative Research Infrastructure (`@kalika/materials-collab`)

#### 128.7.1 Project Management

- [x] **128.7.1.1** Implement materials project workspace: create, configure,
      and manage research projects containing structures, calculations,
      notebooks, and results — with project-level metadata (PI, funding,
      keywords), access control (owner, admin, contributor, viewer roles), and
      activity timeline
- [x] **128.7.1.2** Implement shared structure library: team-curated collection
      of crystal structures with tags (substrate, target, precursor, reference),
      search by composition/space group/property, version history per structure
      (track relaxation steps, manual edits), and import from CIF/POSCAR/XYZ
      files
- [x] **128.7.1.3** Implement calculation provenance tracking: for every
      computation, record: input structure (hash), method parameters
      (functional, basis set, k-mesh, convergence criteria), code version (VASP
      6.4.1, QE 7.2, Kalika native), machine (hostname, cores, GPU), wall-time,
      and output files — enabling full reproducibility and audit trail
- [x] **128.7.1.4** Implement calculation workflow templates: save and share
      multi-step workflows (e.g., relax → SCF → band structure → DOS → phonon)
      as reusable templates, with parameter presets for different accuracy
      levels (fast screening, standard, high accuracy, benchmark)
- [x] **128.7.1.5** Implement dataset management: organize results into named
      datasets (e.g., "ternary oxide screening Q4 2026"), with metadata, DOI
      assignment, and export to standard formats (JSON, CSV, HDF5) for external
      sharing and archival

#### 128.7.2 Comparison & Benchmarking

- [x] **128.7.2.1** Implement cross-functional comparison: for the same
      material, compare results from different DFT functionals (LDA, PBE,
      PBEsol, SCAN, HSE06, PBE0) — side-by-side property tables, overlaid band
      structures and DOS, with experimental reference values highlighted and
      MAE/RMSE metrics
- [x] **128.7.2.2** Implement cross-code comparison: compare results from
      different DFT codes (VASP, Quantum ESPRESSO, ABINIT, Kalika native) for
      the same structure and equivalent settings — verifying consistency and
      identifying code-specific artifacts
- [x] **128.7.2.3** Implement reproducibility report: given two calculations of
      the same material with nominally identical settings, quantify agreement
      (energy difference per atom, force RMSE, band gap difference, phonon
      frequency MAE) and flag discrepancies above threshold — essential for
      computational materials science quality assurance
- [x] **128.7.2.4** Implement benchmark suite: curated set of materials with
      well-established experimental properties (Si, NaCl, MgO, Fe, Cu, GaAs,
      SrTiO3, LiFePO4), run standard calculations and compare with reference
      values — for validating new methods or code versions

#### 128.7.3 Publication-Ready Output

- [x] **128.7.3.1** Implement publication figure generator: export band
      structure, DOS, phonon dispersion, phase diagrams as publication-quality
      vector graphics (SVG/PDF) with journal-appropriate formatting (font sizes,
      line widths, color schemes for colorblind accessibility), axis labels with
      proper Unicode symbols and units
- [x] **128.7.3.2** Implement property table generator: generate formatted
      tables of lattice parameters (a, b, c, alpha, beta, gamma), band gaps
      (direct/ indirect), elastic constants (C_ij matrix), phonon frequencies at
      Gamma, effective masses, and other computed properties — in LaTeX,
      Markdown, or HTML format with configurable significant figures
- [x] **128.7.3.3** Implement supplementary information generator: compile
      convergence tests (k-mesh, cutoff energy), computational details
      (functional, pseudopotential, parameters), raw data tables, and additional
      figures into a structured SI document — in LaTeX or docx format
- [x] **128.7.3.4** Implement CIF file generator: export crystal structures in
      Crystallographic Information Framework format, with all symmetry
      operations, atomic positions (fractional), anisotropic displacement
      parameters, occupancy factors, and metadata (author, reference, data
      collection conditions) — for submission to ICSD, COD, or journal SI
- [x] **128.7.3.5** Implement data deposition formatter: prepare calculation
      results in NOMAD archive format (JSON-LD with NOMAD metainfo schema),
      Materials Cloud AiiDA archive format, or OPTIMADE API format — for FAIR
      data sharing and compliance with journal data availability requirements

#### 128.7.4 Sharing & Collaboration

- [x] **128.7.4.1** Implement notebook sharing: share materials science
      notebooks with collaborators via link, with permission levels (view only,
      comment, execute, edit), optional expiration date, and password protection
      for sensitive pre-publication data
- [x] **128.7.4.2** Implement result sharing: generate shareable link to
      specific calculation result set, including interactive 3D structure
      viewer, property plots, and raw data download — accessible without login
      for public results, authenticated for private results
- [x] **128.7.4.3** Implement Jupyter export: convert materials science
      notebooks to standard .ipynb format, with 3D viewers replaced by static
      images and interactive widgets replaced by matplotlib equivalents — for
      sharing with collaborators using Jupyter ecosystem
- [x] **128.7.4.4** Implement annotation and discussion: inline commenting on
      structures, plots, and notebook cells, with @mention notifications,
      threaded discussions, and resolution tracking — for collaborative
      interpretation of results

#### 128.7.5 Experimental Characterization & Lab Data

- [x] **128.7.5.1** Define `SampleRecord`, `SynthesisBatch`,
      `CharacterizationRun`, and `FacilitySession` types: encode sample lineage,
      processing history, operator, instrument/facility, calibration state,
      environment (temperature, pressure, gas, bias), and links to notebook and
      workflow artifacts — making experimental provenance first-class
- [x] **128.7.5.2** Implement experimental data import pipeline: ingest XRD/XRR,
      Raman/PL maps, SEM/TEM/STEM images, EBSD maps, atom probe tomography, and
      synchrotron/neutron beamline exports with raw files, reduced data, and
      instrument metadata preserved
- [x] **128.7.5.3** Implement microscopy and mapping analysis workspace: support
      annotation, segmentation, grain/defect/phase labeling, region-of-interest
      extraction, scale-bar calibration, and derived feature tables for EBSD,
      TEM/STEM, SEM, and spectroscopy maps
- [x] **128.7.5.4** Implement correlative experiment-simulation alignment:
      register experimental datasets to computed structures,
      diffraction/spectrum predictions, and phase-diagram regions — enabling
      "this image/spectrum is most consistent with this structure, defect
      chemistry, and processing path" workflows
- [x] **128.7.5.5** Implement operando and in situ experiment timelines: align
      time-resolved XRD, spectroscopy, microscopy, electrochemistry, or thermal
      measurements with simulation states, process steps, and agent decisions,
      with synchronized playback and event markers
- [x] **128.7.5.6** Implement ELN/LIMS/facility connectors: sync sample
      metadata, instrument bookings, beamtime IDs, run manifests, and access
      controls from external lab systems while preserving Kalika-side provenance
      and sharing permissions

---

### 128.8 Materials Science Knowledge Graph (`@kalika/materials-graph`)

#### 128.8.1 Materials Ontology

- [x] **128.8.1.1** Implement materials ontology schema: define entity types
      (Material, Structure, Phase, Element, Property, Calculation, Paper,
      Researcher, SynthesisMethod), relationship types (has_structure,
      has_property, synthesized_by, computed_with, reported_in,
      isostructural_to, composed_of), and property types (scalar, tensor,
      spectrum, function of T/P) — compatible with EMMO (European Materials
      Modelling Ontology) and MatOnto standards
- [x] **128.8.1.2** Implement structure-property linkage graph: encode which
      structural features (bond lengths, coordination numbers, orbital overlap,
      band topology) determine which properties (band gap, conductivity,
      hardness, thermal expansion), with quantified correlation strengths from
      data mining across the knowledge graph
- [x] **128.8.1.3** Implement processing-structure-property triangle: encode
      relationships between synthesis/processing conditions (temperature,
      atmosphere, annealing, doping), resulting structure (phase, defects, grain
      size, texture), and measured/computed properties — enabling "given this
      processing, predict this structure and these properties" reasoning
- [x] **128.8.1.4** Implement material genealogy graph: track which materials
      inspired which — parent materials (structure prototypes), derivative
      materials (doped variants, solid solutions, surface modifications), and
      analogous materials (isoelectronic, isostructural) — enabling "materials
      inspired by perovskite SrTiO3" queries

#### 128.8.2 Graph-Based Property Prediction

- [x] **128.8.2.1** Implement compositional neighbor search: given a target
      composition, find materials in the knowledge graph with similar
      compositions (Earth mover's distance in element space), retrieve their
      known properties, and estimate target properties by composition-weighted
      interpolation with uncertainty
- [x] **128.8.2.2** Implement structural analog search: given a target
      structure, find materials with the same space group and similar Wyckoff
      positions, retrieve their properties, and predict target properties by
      structural analogy — leveraging the observation that isostructural
      materials often have similar property trends
- [x] **128.8.2.3** Implement isoelectronic compound prediction: identify
      isoelectronic substitutions (e.g., GaAs → ZnSe → CuBr), predict property
      changes along the isoelectronic series (band gap trend, effective mass
      trend), and suggest unexplored isoelectronic compounds
- [x] **128.8.2.4** Implement graph neural network property prediction: train
      GNN on the materials knowledge graph (material nodes with features,
      property edges with values) to predict missing properties, with attention
      mechanisms highlighting which graph neighbors are most informative for
      each prediction

#### 128.8.3 Literature Integration

- [x] **128.8.3.1** Implement paper-material linking: for each material in the
      graph, link to papers that report experimental or computational data, with
      extracted property values (band gap = 1.1 eV from Smith et al. 2024),
      experimental conditions (T=300K, single crystal), and confidence
      assessment (peer-reviewed journal, preprint, conference proceeding)
- [x] **128.8.3.2** Implement experimental property aggregation: for materials
      with multiple experimental reports, aggregate property values with
      uncertainty estimation (weighted mean, outlier detection, systematic error
      correction between measurement techniques), and present as recommended
      values with provenance trail
- [x] **128.8.3.3** Implement computational benchmark database: collect reported
      DFT/GW/DMFT results from literature for benchmark materials, organize by
      method and code, compute statistics (mean, std, range) across studies, and
      identify systematic biases (PBE underestimates band gaps by ~40% for
      standard semiconductors)

---

### 128.9 Educational & Onboarding (`@kalika/materials-education`)

#### 128.9.1 Interactive Tutorials

- [x] **128.9.1.1** Implement "Your first DFT calculation" tutorial: guided
      notebook walking through silicon band structure calculation — import
      structure (diamond cubic Si), set up calculation parameters (PBE, PAW, 400
      eV cutoff, 8x8x8 k-mesh), run SCF, compute band structure along
      Gamma-X-W-K-Gamma-L path, analyze results (indirect gap ~0.6 eV with PBE),
      compare with experiment (1.12 eV), discuss band gap problem
- [x] **128.9.1.2** Implement "Understanding phonons" tutorial: diamond phonon
      dispersion — build diamond cubic carbon structure, compute force constants
      (finite displacement or DFPT), construct dynamical matrix, diagonalize for
      phonon frequencies, plot dispersion and DOS, animate optical/acoustic
      modes, compute thermal properties C_v(T), compare with experiment
- [x] **128.9.1.3** Implement "Defect calculations 101" tutorial: silicon
      vacancy — generate supercell (2x2x2 or 3x3x3), create vacancy, relax
      structure, compute formation energy (neutral vacancy), introduce charge
      states (V^0, V^-, V^2-), compute charge transition levels, apply
      finite-size corrections (Freysoldt/Kumagai), plot transition level diagram
- [x] **128.9.1.4** Implement "High-throughput screening" tutorial: find stable
      ternary oxides in the A-B-O system (A=alkaline earth, B=transition metal)
      — define composition space, generate candidate structures from prototypes,
      compute formation energies, build convex hull, identify stable phases,
      compute properties of hits, rank by target metric
- [x] **128.9.1.5** Implement "ML potentials" tutorial: train a machine learning
      interatomic potential for silicon — generate training data (AIMD
      trajectories at multiple temperatures), extract atomic descriptors (SOAP,
      ACE), train GAP/NequIP/MACE model, validate (energy/force parity plots,
      phonon comparison), run MD with ML potential (1000x faster than AIMD),
      analyze thermal properties

#### 128.9.2 Contextual Help & Documentation

- [x] **128.9.2.1** Implement tooltips throughout UI: hover over any parameter
      (k-mesh density, cutoff energy, smearing width, convergence threshold) to
      see explanation, recommended range, and link to relevant documentation —
      context-sensitive, adapting to the current calculation type
- [x] **128.9.2.2** Implement method comparison guide: interactive decision tree
      for choosing computational method — "What property do you need?" → "What
      accuracy?" → "What system size?" → recommended method (DFT-PBE, HSE06, GW,
      DMFT, ML potential) with estimated computational cost and expected
      accuracy
- [x] **128.9.2.3** Implement materials science glossary: searchable dictionary
      of materials science terms (Brillouin zone, density of states, formation
      energy, convex hull, phonon, Fermi surface, etc.) with definitions,
      equations, diagrams, and cross-references — accessible from any point in
      the UI via Ctrl+Shift+G hotkey
- [x] **128.9.2.4** Implement error diagnosis assistant: when a calculation
      fails or produces suspicious results, analyze the output and suggest
      remedies — "SCF not converging" → suggest mixing parameter reduction,
      different diagonalization algorithm, or charge density restart; "Negative
      phonon frequencies" → suggest tighter relaxation, larger supercell, or
      symmetry reduction

---

### 128.10 Performance & Scalability (`@kalika/materials-infra`)

#### 128.10.1 Computation Queue Management

- [x] **128.10.1.1** Implement local job queue: manage calculation jobs on the
      local machine with configurable parallelism (max concurrent DFT jobs, max
      CPU cores, max memory), priority queue (user-assigned priority + estimated
      wall-time), and job lifecycle management (submit, queue, run, complete,
      fail, cancel)
- [x] **128.10.1.2** Implement SLURM integration: submit calculations to SLURM-
      managed HPC clusters via SSH, with automatic job script generation
      (partition selection, resource request, module loading, input file
      staging), job monitoring (squeue polling), output retrieval, and error
      handling (resubmit on node failure)
- [x] **128.10.1.3** Implement PBS/Torque integration: equivalent to SLURM
      integration for PBS/Torque-managed clusters, with qsub script generation,
      qstat monitoring, and output retrieval
- [x] **128.10.1.4** Implement SGE integration: equivalent to SLURM integration
      for Sun Grid Engine clusters, with qsub/qstat/qdel support
- [x] **128.10.1.5** Implement job dependency management: define job chains
      where later jobs depend on earlier jobs completing successfully (e.g.,
      relaxation → SCF → band structure), with automatic input file transfer
      between dependent jobs and rollback on failure

#### 128.10.2 Cloud Compute Integration

- [x] **128.10.2.1** Implement AWS compute integration: provision EC2 instances
      (CPU for DFT, GPU for ML) on demand, configure with required software
      (VASP, QE, PyTorch), submit jobs, monitor, retrieve results, and terminate
      instances when idle — with cost tracking ($/calculation) and budget alerts
- [x] **128.10.2.2** Implement GCP compute integration: equivalent to AWS for
      Google Cloud Platform Compute Engine instances, with preemptible/spot
      instance support for cost reduction on fault-tolerant calculations
- [x] **128.10.2.3** Implement Azure compute integration: equivalent to AWS for
      Azure Virtual Machines, with Azure Batch support for embarrassingly
      parallel screening workflows
- [x] **128.10.2.4** Implement hybrid local-cloud scheduling: intelligently
      route jobs to local cluster or cloud based on queue wait time, job
      urgency, cost budget, and data locality — with automatic failover from
      full local queue to cloud burst

#### 128.10.3 Data Performance

- [x] **128.10.3.1** Implement result caching system: content-addressable cache
      keyed on structure fingerprint (Niggli cell + sorted species + Wyckoff
      positions) + method parameters hash, with LRU eviction, configurable cache
      size, and cache hit statistics — avoiding redundant recomputation across
      users and projects
- [x] **128.10.3.2** Implement lazy loading for large datasets: charge density
      grids (millions of points), MD trajectories (thousands of frames ×
      thousands of atoms), and phonon band structures (thousands of q-points)
      loaded on demand with streaming decompression, not upfront — keeping
      memory usage bounded
- [x] **128.10.3.3** Implement progressive crystal structure rendering:
      level-of- detail (LOD) system for large structures (> 10,000 atoms): at
      maximum zoom, render full detail (spheres, bonds, labels); at medium zoom,
      simplify to billboard sprites and reduced bond count; at minimum zoom,
      render as point cloud — maintaining 60fps regardless of atom count
- [x] **128.10.3.4** Implement WebSocket real-time updates: push calculation
      progress to dashboard in real time (SCF convergence per iteration, ionic
      relaxation steps, MD timestep counter), phonon computation progress
      (q-point completion), and discovery agent status — without polling, using
      persistent WebSocket connections

#### 128.10.4 Import/Export & Interoperability

- [x] **128.10.4.1** Implement CIF parser: read Crystallographic Information
      Framework files (CIF 1.1 and CIF 2.0), handling: cell parameters, atom
      positions (fractional and Cartesian), symmetry operations, space group,
      anisotropic displacement parameters, disorder/partial occupancy, and
      multi-block CIF files — with robust handling of non-standard CIF variants
- [x] **128.10.4.2** Implement POSCAR/CONTCAR parser: read VASP structure files
      (direct and Cartesian coordinates, selective dynamics flags, velocity
      block), with automatic species detection from POTCAR or header line
- [x] **128.10.4.3** Implement XYZ/extXYZ parser: read XYZ format (simple and
      extended), handling: lattice vectors in comment line (ASE convention),
      per-atom properties (forces, charges, velocities), and multi-frame
      trajectories
- [x] **128.10.4.4** Implement Quantum ESPRESSO input/output parser: read/write
      QE pw.x input files (CELL_PARAMETERS, ATOMIC_POSITIONS, ATOMIC_SPECIES,
      K_POINTS, &CONTROL/&SYSTEM/&ELECTRONS namelists), parse pw.x output for
      energies, forces, eigenvalues, and convergence data
- [x] **128.10.4.5** Implement VASP output parser: parse OUTCAR (energies,
      forces, stress, eigenvalues, DOS, dielectric function), vasprun.xml
      (comprehensive structured output), EIGENVAL (band structure), DOSCAR
      (density of states), CHGCAR (charge density), and WAVECAR (wavefunctions)
      — for importing existing VASP calculations into the platform
- [x] **128.10.4.6** Implement pymatgen interoperability: bidirectional
      conversion between Kalika CrystalStructure and pymatgen Structure/Molecule
      objects, enabling use of pymatgen's extensive analysis tools (symmetry
      analysis, structure matching, phase diagram construction) alongside
      Kalika's native capabilities
