# Phase 127 Evidence — Kalika Materials Code Interoperability & Databases

**Status: 259 / 259 tasks complete.** All 13 Phase 127 libraries pass their
targeted test suites. The standard suites now contain **345 tests**, plus two
opt-in integration tests exercised against a real ASE 3.26 runtime (`.traj` ULM
and `.db` SQLite compatibility).

## Libraries delivered

| Library                       | Tests              | Scope                                                                                                                                                                                                              |
| ----------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `@kalika/code-interfaces`     | 88 + 2 integration | core types, CodeInterface, WorkflowDAG, JobStatus, KalikaStructure, CIF/POSCAR/XYZ/PDB converters, units (CODATA 2018), 10 code interfaces, ASE `.traj`/SQLite, Open Babel, pymatgen/custodian/prototype ecosystem |
| `@kalika/vasp-io`             | 94                 | INCAR (166-tag DB, writer/validator, 13 presets), POSCAR/KPOINTS (14 Bravais SC k-paths), POTCAR, output parsers including random-access WAVECAR and `vaspout.h5`, error handling + custodian fixes, adapter       |
| `@kalika/qe-io`               | 20                 | pw.x input/presets, SSSP/UPF, pw.x/XML/ph.x/matdyn/pp.x parsers, bands/dos/projwfc/epsilon/hp tools, adapter                                                                                                       |
| `@kalika/abinit-io`           | 13                 | multi-dataset input, presets, output/DDB/GW parsers, CDF-1/CDF-2 and NetCDF-4/HDF5 output                                                                                                                          |
| `@kalika/fhi-aims-io`         | 10                 | geometry.in/control.in, species defaults, presets, aims.out/bands parsers                                                                                                                                          |
| `@kalika/lammps-io`           | 16                 | data I/O, script builder, pair/fix/compute/dump helpers, presets, log/dump/restart parsing through LAMMPS's supported converter, potential registry + OpenKIM                                                      |
| `@kalika/gromacs-io`          | 12                 | .gro/.top/.mdp/.ndx, lazy XTC, TRR, ENX-v5 EDR, force-field selection                                                                                                                                              |
| `@kalika/phonopy-io`          | 16                 | YAML I/O, FORCE_SETS/BORN, dynamical matrix + NAC, DOS, thermodynamics, phono3py                                                                                                                                   |
| `@kalika/wannier90-io`        | 13                 | .win, projections, .amn/.mmn/.eig, .wout, \_hr.dat + interpolation, DFT→W90, BoltzWann                                                                                                                             |
| `@kalika/lobster-io`          | 6                  | lobsterin, COHPCAR/COOPCAR/COBICAR/ICOHPLIST/CHARGE/GROSSPOP                                                                                                                                                       |
| `@kalika/boltztrap-io`        | 5                  | input prep, transport parser, ZT figure of merit                                                                                                                                                                   |
| `@kalika/materials-databases` | 23                 | HTTP client, OPTIMADE + aggregator, MP/AFLOW/JARVIS/OQMD/NOMAD/COD/PubChem/Materials-Cloud/Citrine clients                                                                                                         |
| `@kalika/workflows`           | 29                 | execution engine + recovery, SLURM/PBS/SGE/LSF submitters, provenance (Merkle), results store, 13 templates, registry, integration tests                                                                           |

## Physics validated against analytics

- Phonon dispersion: 1D chain ω = 2√(k/M)|sin(πq)| matched to 3 decimals; Cv →
  3NR Dulong-Petit; ZPE = Σ½ħω.
- Wannier interpolation: tight-binding E(k) = 2t·cos(2πk) exact.
- Unit conversions vs CODATA 2018 (Ha/Ry/Bohr/GPa/eV·Å⁻³).
- Prototype matching: NaCl/W/CsCl identified by space group + Pearson +
  stoichiometry.
- Elastic tensor kBar→GPa, dielectric ε∞ = electronic+ionic, Born charges.

## Formerly deferred binary/ecosystem coverage

- WAVECAR uses validated fixed-record random access with lazy coefficient reads;
  both VASP complex precision tags are fixture-tested. The shared
  `code-io-kernel` Rust crate exposes WAVECAR and compressed-XTC decoders
  through `wasm-bindgen`; native tests and a `wasm32-unknown-unknown` compile
  check pass.
- `vaspout.h5` and ABINIT NetCDF-4 use the repository's WASM HDF5 runtime;
  ABINIT classic CDF-1/CDF-2 is decoded natively.
- LAMMPS restarts use the official, version-safe `-restart2data` path rather
  than guessing the private executable-specific payload.
- XTC is tested against an independently encoded libxdrfile fixture in both
  TypeScript and Rust; TRR and ENX-v5 EDR cover coordinates, velocities, forces,
  box, time, lambda, units, and terms.
- ASE ULM `.traj`, JSON trajectories, and `.db` were verified with ASE 3.26
  itself. Open Babel has an explicit Python runtime bridge, and Citrine has
  authenticated PIF search with injectable transport coverage for auth-gated
  deployments.

## Verification

- All 13 library Vitest suites: **345 / 345 passed**.
- Real ASE 3.26 integration suite: **90 / 90 passed**, including the two opt-in
  interoperability tests.
- Molecular-dynamics trajectory regression suite: **9 / 9 passed**.
- Rust native unit and doc tests: **3 / 3 passed**; the crate also passes
  `cargo check --target wasm32-unknown-unknown`.
- Focused TypeScript checks pass for code-interfaces, VASP, ABINIT, LAMMPS,
  GROMACS, materials-databases, and molecular-dynamics. Targeted ESLint reports
  no errors.
