The
libs/kalika/area: ~96 Nx projects making up Oshun's scientific-research platform — a symbolic-algebra core, two Rust compute kernels, a Python/Jupyter SDK surface, and a broad library of mathematics, theoretical-physics, and materials-science code. This page is the entity-catalog view; the narrative architecture lives in the Kalika domain space.
What this area is#
Kalika is the layer underneath Oshun's consumer domains: the symbolic
representation, the provenance model, the compute kernels, the reactive research
notebooks, the autonomous research agents, and a very wide library of
mathematics and physics implementations. The organising idea is the
reproducibility-and-auditability gap in computational science — a bare
number is not a result; the derivation chain, assumptions, units, tolerance, and
verification status are. @kalika/core's ProvenResult<T> and Expr AST carry
that metadata through the stack.
The area is unusually large and unevenly integrated, and the most important
honest fact about it (documented at length on the domain architecture page) is
that it holds two parallel compute substrates that are not yet wired to each
other at runtime: the Rust kernels (@kalika/cas-engine,
@kalika/numerical-engine) and a hand-written TypeScript symbolic/numeric stack
built on @kalika/core. The Rust kernels are genuinely deep (tens of thousands
of lines), but with one exception (@kalika/electronic-structure depends on
@kalika/numerical-engine) no TypeScript package imports them — the
'@kalika/cas-engine' strings in packages like @kalika/arithmetic and
@kalika/calculus are backend-name labels/metadata, not imports.
A handful of packages are deliberately thin: facade/aggregator packages that
only re-export sibling libraries (e.g. @kalika/mathematical-physics,
@kalika/operators, @kalika/cohomology) or declare a capability/metadata
constant (@kalika/arithmetic, @kalika/calculus), and one near-empty
scaffold (@kalika/wannier). The bulk, however, are substantial: dozens of
TypeScript libraries in the multi-thousand-line range with real, domain-specific
module decompositions (named explicitly per entity below).
How it fits the wider system#
These libraries are consumed by the Kalika applications (apps/kalika/* — the
compute service, notebook backend, research-agent runners) and by the
TypeScript/Python SDKs (@kalika/sdk, kalika-sdk-python,
kalika-jupyter-kernel). Internally they form a dependency cone rooted at
@kalika/core (the Expr AST, provenance, rewrite engine): the math/physics
libraries build on core and on each other, the facade packages re-export them
into convenient umbrellas, and the platform libraries (@kalika/database,
@kalika/knowledge-graph, @kalika/renderer, @kalika/notebooks,
@kalika/research-agents, @kalika/training-data) compose the computational
libraries into storage, visualization, notebook, and agentic-research surfaces.
Walk the "used by" edges on any node below to see exactly who depends on it.
Two further families sit alongside the mathematics/physics cone:
- First-principles materials science —
@kalika/crystallographyplus the lattice-dynamics chain (phonons,phonons-dfpt,phonons-anharmonic,phonons-special,thermal-transport,electron-phonon,eliashberg,polarons) and the many-body/correlated-electron chain (many-body,gw,bse,response,tddft,dmft,qmc,cc-solids,embedding,molecular-dynamics, benchmarked bymany-body-benchmarks). Real named algorithms in TypeScript (tetrahedron DOS, CT-HYB, Allen-Dynes, fixed-node DMC), mostly compact/formula-level rather than plane-wave-scale solvers; DFT-engine execution and GPU kernels are explicit fail-loud seams, andmolecular-dynamicscarries Rust crates not yet bridged to TS. - Lab automation / self-driving lab —
@kalika/experiment-orchestration(the shared type backbone) withdoe,protocols,instrument-control,lab-safety,sample-ops,closed-loop-experiments, andresearch-ops: design, compile, safety-gate, track, and close the loop on experiment campaigns. Honestly a control-plane/policy layer — typed models, validators, and planners; no live instrument transport is implemented (drivers are interface seams).
Entity reference#
@kalika/core#
The symbolic foundation (libs/kalika/core/src, ~62 files): the Expr AST
(expr.ts), hash-consing arena, e-graph/rewrite engine (egraph.ts,
rewrite-rule.ts, rewrite-strategy.ts, pattern.ts, matching.ts),
provenance (derivation.ts, proven-result.ts, verification-badge.ts),
numerical compiler, and many interchange formats (openmath, mathml,
smtlib, tptp, scscp, serialization). The most heavily depended-on package
in the area; everything symbolic is rooted here.
@kalika/cas-engine#
A real Rust computer-algebra kernel (libs/kalika/cas-engine, ~43k lines of
Rust across three crates: kalika-cas-core plus kalika-cas-native (napi-rs)
and kalika-cas-wasm (wasm-bindgen) bridges). kalika-cas-core mirrors the
@kalika/core AST with arbitrary-precision integers, canonical ordering,
hash-consed storage and the URN1 binary envelope. Substantial and benchmarked,
but per the domain architecture page not imported by any TypeScript package at
runtime today — it is a built-but-not-wired substrate.
@kalika/numerical-engine#
A real Rust dense/sparse linear-algebra kernel (libs/kalika/numerical-engine;
the core crate's lib.rs is ~27k lines covering matrix decompositions, error
types, SIMD paths). Unlike cas-engine, it is declared as a runtime
dependency in @kalika/electronic-structure's package.json (cas-engine is
absent there — it appears only in the looser project.json
implicitDependencies, alongside numerical-engine), so it is the one Rust
kernel with a TypeScript consumer.
@kalika/sdk#
The TypeScript client SDK (libs/kalika/sdk/src): engine, numeric,
physics, sdk, types, and wasm-kernel modules — the developer-facing
surface for driving Kalika computations.
kalika-sdk-python#
Python bindings (libs/kalika/sdk-python/src/kalika_sdk) exposing a SymPy-like
surface (symbols, diff, integrate, solve); the default backend shells
out to the TypeScript SDK via a Node/tsx subprocess (_bridge.ts,
backends.py, client.py, expressions.py). Nx project name is the un-scoped
kalika-sdk-python.
kalika-jupyter-kernel#
A Jupyter kernel (libs/kalika/jupyter-kernel/src/kalika_jupyter, ~600 lines
Python) that runs Kalika CAS computations from notebook cells (simplify,
diff, integrate, solve, eval) while preserving derivation chains and
verification metadata in rich output bundles. Nx project name
kalika-jupyter-kernel.
@kalika/database#
The persistence + ingestion layer (libs/kalika/database/src, ~40 files):
computation cache, embedding service, schema, migrations, vector search, and a
suite of scientific-database importers (lmfdb, oeis, hepdata, knotinfo,
kreuzer-skarke, sxs-catalog), plus privacy-preserving computation logging.
@kalika/knowledge-graph#
A mathematical knowledge graph (libs/kalika/knowledge-graph/src, ~31 files):
ontology, concept linking, analogy/gap detection, graph-RAG, prerequisite
computation, theorem-dependency graph, Lean-theorem registration and Mathlib
dependency extraction, with persistence and query layers.
@kalika/research-agents#
Autonomous research agents (libs/kalika/research-agents/src, ~60 files):
conjecture formulation/validation, FunSearch-style generation, proof agent /
proof-search-tree / proof-repair, retrieval-augmented proving, multi-agent
orchestration, plus literature clients (arxiv, inspire-hep,
semantic-scholar, openalex, oeis) and paper-claim/reproduction verifiers.
@kalika/training-data#
ML training-data pipeline for math models (libs/kalika/training-data/src, ~74
files): arXiv-LaTeX extraction, dedup, domain balancing, proof-pile, tokenizer
extension, embedding/instruction-tuning/reward-model training, RLVF,
constitutional AI, model A/B testing, serving/routing, speculative decoding,
KV-cache. A large self-contained ML-ops corner of the area.
@kalika/notebooks#
The reactive research-notebook model (libs/kalika/notebooks/src, ~53 files):
reactive engine, CAS kernel, cell execution, dependency locking, reproducibility
- provenance, Jupyter/Mathematica/Pluto interoperability, LaTeX paper import, collaboration/comments/sharing/versioning, reproducible export.
@kalika/renderer#
Scientific visualization (libs/kalika/renderer/src, ~40 files): function/data
plotting, complex visualization, vector/field plots, plus physics-specific
diagram renderers (feynman-diagram, tikz-feynman, dynkin-diagram,
penrose-carter-diagram, spacetime-diagram, quantum-circuit-diagram,
tensor-network-diagram, young-diagram), gltf, pgfplots, and
time-evolution animation.
@kalika/citations#
Citation/bibliography management (libs/kalika/citations/src, ~19 files):
arxiv/doi/inspire resolvers, a citation manager, normalization, formats, a
local database, and graph visualization.
@kalika/typesetting#
LaTeX typesetting and import (libs/kalika/typesetting/src): equations,
derivation, latex + latex-import, and paper modules for rendering Kalika
results and ingesting papers.
@kalika/hpc-orchestrator#
Compute orchestration (libs/kalika/hpc-orchestrator/src): job scheduler,
distributed computation, resource monitor, and a computation cache — the
substrate for farming out long-running scientific jobs.
@kalika/formal-verification#
A broad formal-methods bridge (libs/kalika/formal-verification/src, ~56
files): SMT solver, first-order ATP, decision procedures, model/computability
theory, derivation-to-tactic, Lean (lean-process-manager,
lean-source-parser, lean-to-kalika/kalika-to-lean, Mathlib lemma DB), and
bridges to Coq, Isabelle, Metamath, SymPy, Sage, Oscar, Symbolica, Wolfram, plus
cross-CAS/cross-prover verification.
@kalika/utils#
Shared scientific utilities (libs/kalika/utils/src): dimensions,
physical-constants, and physical-quantity (units-and-dimensions support used
across the physics libraries).
@kalika/autodiff-core#
Core automatic differentiation (libs/kalika/autodiff-core/src): forward-mode
and a namespaced reverse-mode — the low-level AD primitives.
@kalika/autodiff#
Higher-level autodiff (libs/kalika/autodiff/src, ~14 files): forward/reverse
mode plus CAS-adjoint, ODE-adjoint, PDE-adjoint, and numerical-compatibility
layers tying AD into the symbolic and numeric engines.
@kalika/algebra#
Abstract & linear algebra (libs/kalika/algebra/src, ~22 files, ~10.7k lines):
linear-algebra, matrix-functions, rings, modules, field-extensions,
galois, finite-groups + finite-group-atlas, decompositions, spectral.
@kalika/arithmetic#
A thin facade/metadata package (libs/kalika/arithmetic/src/index.ts, ~10
lines): exports only package/backend-name constants and a frozen
ARITHMETIC_CAS_ENGINE_CAPABILITIES list naming @kalika/cas-engine as the
intended backend. No arithmetic is implemented here — it is a capability label,
not an import.
@kalika/calculus#
A thin facade/metadata package (libs/kalika/calculus/src/index.ts, ~10
lines): like @kalika/arithmetic, only package/backend-name constants and a
frozen CALCULUS_CAS_ENGINE_CAPABILITIES list. The actual calculus lives in the
Rust cas-engine (not wired) and the live TS engine; this package is metadata.
@kalika/number-theory#
Computational number theory (libs/kalika/number-theory/src, ~40 files):
elliptic curves + L-functions, modular forms/symbols/Hecke, number fields, local
fields, rings of integers, factorization, primality, Mordell-Weil, and
high-precision/general L-function machinery.
@kalika/combinatorics#
Combinatorics (libs/kalika/combinatorics/src): enumerative, graphs,
species, and tableaux modules.
@kalika/algebraic-combinatorics#
Algebraic combinatorics (libs/kalika/algebraic-combinatorics/src): matroids
matroid-kazhdan-lusztig,posets, andehrhart(Ehrhart polynomials).
@kalika/algebraic-geometry#
A large algebraic-geometry library (libs/kalika/algebraic-geometry/src, ~37
files): schemes, sheaves, divisors, cohomology, derived
categories/functors, bridgeland-stability, fourier-mukai, moduli-spaces,
git-quotients, homotopy-continuation, numerical-irreducible-decomposition,
with msolve/dmodule interfaces.
@kalika/analysis#
Real/complex/functional analysis (libs/kalika/analysis/src, ~25 files):
complex-analysis, conformal-mapping, riemann-surfaces, hilbert-space,
operator-theory, distribution-theory,
fourier/laplace/integral-transforms, asymptotics,
dispersion-relations, and series.
@kalika/approximation#
Approximation theory (libs/kalika/approximation/src): chebyshev-technology,
polynomial-approximation, and rational-approximation.
@kalika/numerical#
Numerical computing in TypeScript (libs/kalika/numerical/src, ~28 files):
arbitrary-precision arithmetic, computational geometry, Taylor models, verified
computation, Mellin-Barnes, plus interfaces (gmsh, hdf5) and benchmark/
validation suites (linear-algebra, ODE, PDE, Monte-Carlo). The TS numeric path,
distinct from the Rust numerical-engine.
@kalika/measure-theory#
Measure theory (libs/kalika/measure-theory/src): measure-spaces,
integration-theorems, and ergodic-theory.
@kalika/probability#
Probability (libs/kalika/probability/src, ~13 files): distributions,
markov-chains, stochastic-processes, random-matrix, and Schramm-Loewner
evolution (schramm-loewner, sle-cft).
@kalika/optimization#
Optimization (libs/kalika/optimization/src, ~22 files, ~15.9k lines): linear /
semidefinite (with sdpb-interface) / convex / nonlinear / global +
verified-global programming, least-squares fitting, variational discretization,
and quantum-variational methods.
@kalika/optimal-transport#
Optimal transport (libs/kalika/optimal-transport/src): sinkhorn,
wasserstein, monge-ampere, and displacement-interpolation.
@kalika/sdp-core#
A focused semidefinite-programming core (libs/kalika/sdp-core/src): a single
substantial semidefinite-programming module (~2.5k lines) — the SDP solver
primitives reused by bootstrap/optimization consumers.
@kalika/surrogate#
Surrogate modelling (libs/kalika/surrogate/src): a single substantial
gaussian-process module (~1.7k lines) for GP regression/emulation.
@kalika/category-theory#
Category theory (libs/kalika/category-theory/src, ~19 files): category,
abelian-categories, monoidal-categories, universal-constructions,
topos-theory, string-diagrams, zx-calculus, tqft, and
compositional-systems.
@kalika/higher-categories#
Higher category theory (libs/kalika/higher-categories/src): simplicial-sets,
quasicategories, stable-infinity-categories, and homotopy-algebras.
@kalika/cohomology#
An aggregator facade (libs/kalika/cohomology/src/index.ts, ~11 lines):
re-exports @kalika/topology and @kalika/algebraic-geometry under namespaces
and declares a COHOMOLOGY_SOURCE_MODULES constant. No cohomology code of its
own — it is an umbrella over the two real libraries.
@kalika/differential-geometry#
An aggregator facade (libs/kalika/differential-geometry/src/index.ts, ~9
lines): re-exports @kalika/general-relativity under a namespace plus a source-
modules constant. The differential-geometry machinery actually lives in
@kalika/general-relativity.
@kalika/geometric-analysis#
Geometric analysis (libs/kalika/geometric-analysis/src): geometric flows —
ricci-flow, mean-curvature-flow, harmonic-map-flow, yang-mills-flow, and
perelman-functionals.
@kalika/lie-theory#
Lie theory (libs/kalika/lie-theory/src, ~20 files): lie-groups,
lie-classification, representations, root-operations,
structure-constants, weyl-group, casimir, homogeneous-spaces, and
exceptional-constructions.
@kalika/quantum-groups#
Quantum groups (libs/kalika/quantum-groups/src): drinfeld-jimbo,
crystal-bases, r-matrix, and kazhdan-lusztig.
@kalika/noncommutative-geometry#
Noncommutative geometry (libs/kalika/noncommutative-geometry/src):
spectral-triples, cyclic-cohomology, cstar-k-theory,
noncommutative-algebras, and a standard-model application module.
@kalika/spectral-geometry#
Spectral geometry (libs/kalika/spectral-geometry/src, ~18 files):
heat-kernel, laplace-beltrami, index-theorem + index-applications,
eta-invariant, spectral-zeta, spin-geometry, and curved-spacetime-qft.
@kalika/symplectic#
Symplectic geometry (libs/kalika/symplectic/src): symplectic-manifold,
floer-homology, symplectic-capacities, hamiltonian-reduction, and
geometric-integrators.
@kalika/topology#
Topology (libs/kalika/topology/src, ~26 files): simplicial-complex,
cw-complex, homotopy, cohomology, Morse theory/homology, discrete Morse,
knot-theory, persistent-homology, and TDA applied to cosmic structure /
phase transitions (cosmic-structure-tda, phase-transition-tda).
@kalika/three-manifolds#
3-manifold topology (libs/kalika/three-manifolds/src): heegaard-floer, wrt
(Witten-Reshetikhin-Turaev), and interfaces to regina and snappy.
@kalika/tropical#
Tropical geometry (libs/kalika/tropical/src, ~16 files): semiring,
polynomial, convexity, newton-polytope, variety, grassmannian, and a
feynman (tropical-Feynman) module.
@kalika/vertex-algebras#
Vertex algebras (libs/kalika/vertex-algebras/src): vertex-operator-algebra,
module-theory, w-algebras, standard-constructions, and moonshine.
@kalika/periods#
Periods and polylogarithms (libs/kalika/periods/src, ~14 files): polylog +
elliptic-polylog, mzv (multiple zeta values), hyperint, single-valued,
and feynman-coaction.
@kalika/integrable-systems#
Classical/quantum integrable systems (libs/kalika/integrable-systems/src):
lax-pair, inverse-scattering, soliton-solutions, hirota-bilinear,
classical-r-matrix, and bethe-ansatz.
@kalika/matrix-models#
Matrix models (libs/kalika/matrix-models/src): one-cut-solver,
topological-recursion, and the jt-syk (JT gravity / SYK) module.
@kalika/positive-geometry#
Positive geometry (libs/kalika/positive-geometry/src): amplituhedron,
associahedron, cosmological-polytope, positroid, and a general
positive-geometry module.
@kalika/operators#
An aggregator facade (libs/kalika/operators/src/index.ts, ~11 lines):
re-exports @kalika/analysis and @kalika/quantum-mechanics under namespaces
plus a source-modules constant — an umbrella for operator-theory consumers, with
no implementation of its own.
@kalika/tensor#
An aggregator facade (libs/kalika/tensor/src/index.ts, ~7 lines):
re-exports @kalika/general-relativity and declares
TENSOR_SOURCE_MODULES = ['@kalika/general-relativity']. Tensor-calculus code
lives in the GR library; this is a thin alias.
@kalika/classical-mechanics#
Classical mechanics (libs/kalika/classical-mechanics/src, ~35 files):
lagrangian/hamiltonian, poisson, canonical-transformations, noether,
hamilton-jacobi, kam-theory, birkhoff-normal-form, celestial &
restricted-three-body mechanics, perturbation theory, and a symbolic layer.
@kalika/electrodynamics#
Classical electrodynamics (libs/kalika/electrodynamics/src, ~16 files):
maxwell, fdtd, green-functions, multipole-expansion, radiation,
static-solvers, and waves.
@kalika/optics#
Optics (libs/kalika/optics/src): geometric-ray-optics, fourier-optics,
nonlinear-optics, and quantum-optics.
@kalika/fluid-dynamics#
Fluid dynamics (libs/kalika/fluid-dynamics/src, ~16 files): euler-equations,
navier-stokes, ideal-mhd, shallow-water, turbulence-models,
vortex-dynamics, and standard solutions.
@kalika/plasma-physics#
Plasma physics (libs/kalika/plasma-physics/src): vlasov,
dispersion-relation, mhd-equilibrium, and transport.
@kalika/thermodynamics#
Thermodynamics (libs/kalika/thermodynamics/src): equations-of-state,
phase-diagrams, thermodynamic-cycles, and thermodynamic-potentials.
@kalika/statistical-mechanics#
Statistical mechanics (libs/kalika/statistical-mechanics/src, ~20 files):
partition-functions, classical-lattice-models, mean-field-theory,
quantum-statistical-mechanics, non-equilibrium, RG, exact results, and a
stat-mech-lattice-bridge.
@kalika/quantum-mechanics#
Quantum mechanics (libs/kalika/quantum-mechanics/src, ~35 files):
hilbert-space, operators, time-(in)dependent Schrödinger solvers,
perturbation-theory, path-integral, scattering-formalism,
angular-momentum-coupling, spherical-harmonics, spin-algebra, hybrid
quantum-classical, and a quantum-hardware-interface.
@kalika/quantum-field-theory#
A very large QFT library (libs/kalika/quantum-field-theory/src, ~82 files,
~27k lines): Feynman-rule application, diagram topology, Dirac/color algebra,
IBP reduction, Passarino-Veltman, one-loop scalar integrals, renormalization /
RGE (automated-rge, renormalization-group), Dyson-Schwinger, EFT matching,
NLO automation, and external-tool bridges (amflow, finiteflow).
@kalika/quantum-chaos#
Quantum chaos (libs/kalika/quantum-chaos/src): level-statistics, otoc,
spectral-form-factor, spectral-unfolding, and quantum-billiards.
@kalika/quantum-gravity#
Quantum gravity (libs/kalika/quantum-gravity/src): loop-quantum-gravity,
causal-dynamical-triangulations, and asymptotic-safety.
@kalika/quantum-computing#
An aggregator facade (libs/kalika/quantum-computing/src/index.ts, ~11
lines): re-exports @kalika/quantum-mechanics and @kalika/information-theory
under namespaces plus a source-modules constant — an umbrella, not its own
implementation.
@kalika/open-quantum-systems#
Open quantum systems (libs/kalika/open-quantum-systems/src): lindblad,
beyond-lindblad, and noise-channels.
@kalika/entanglement#
Entanglement measures (libs/kalika/entanglement/src): von-neumann-entropy,
renyi-entropy, negativity, mutual-information, and topological-entropy.
@kalika/information-theory#
Information theory (libs/kalika/information-theory/src):
quantum-information, entanglement, information-geometry, and
thermodynamic-geometry.
@kalika/topological-qc#
Topological quantum computing (libs/kalika/topological-qc/src): anyon-model,
braiding-simulation, gate-compilation, topological-entanglement, and
standard models.
@kalika/general-relativity#
A large GR library (libs/kalika/general-relativity/src, ~52 files): tensor
algebra, curvature tensors, covariant derivative, exact solutions, ADM/BSSN
formalisms, geodesic solver, black-hole + cosmological perturbation,
gravitational-wave extraction, post-Minkowskian scattering/EOB, Killing vectors,
Penrose-Carter, and benchmark suites. The home of the tensor-calculus machinery
that @kalika/tensor and @kalika/differential-geometry alias.
@kalika/gravitational-waves#
Gravitational-wave science (libs/kalika/gravitational-waves/src):
waveform-models, nr-surrogates, data-analysis, detector-models, and
source-modeling.
@kalika/cosmology#
Cosmology (libs/kalika/cosmology/src, ~20 files): friedmann, inflation,
cmb-power-spectrum, dark-energy, structure-formation, cosmological
likelihoods, and Boltzmann-code interfaces (class-interface, camb-interface,
cobaya-interface).
@kalika/astrophysics#
Astrophysics (libs/kalika/astrophysics/src): stellar-structure, tov
(neutron-star structure), compact-objects, accretion-disk, and a mesa
interface.
@kalika/bbn#
Big-Bang nucleosynthesis (libs/kalika/bbn/src): reaction-network,
abundance-prediction, and bsm-constraints.
@kalika/neutrino-physics#
Neutrino physics (libs/kalika/neutrino-physics/src):
oscillation-probability, cross-sections, mass-mechanisms, leptogenesis,
and sphaleron-rate.
@kalika/hep-phenomenology#
HEP phenomenology (libs/kalika/hep-phenomenology/src, ~44 files, ~16.8k
lines): PDG database, spectrum generator, flavor physics, dark-matter/axion
modules, electroweak precision, and a wide set of HEP file-format and tool
bridges (lhef, hepmc3, lhapdf, root-file, fits-file, yoda,
openloops, collier, checkmate, smodels, higgsbounds-signals).
@kalika/particles#
An aggregator facade (libs/kalika/particles/src/index.ts, ~11 lines):
re-exports @kalika/hep-phenomenology and @kalika/quantum-field-theory under
namespaces plus a source-modules constant — an umbrella, no implementation of
its own.
@kalika/feynman#
An aggregator facade (libs/kalika/feynman/src/index.ts, ~11 lines):
re-exports @kalika/quantum-field-theory and @kalika/renderer under
namespaces plus a source-modules constant. The Feynman-diagram math/rendering
lives in those two libraries.
@kalika/string-theory#
A large string-theory library (libs/kalika/string-theory/src, ~48 files,
~14.9k lines): ads-cft, conformal-field-theory, virasoro,
calabi-yau-geometry, mirror-symmetry, toric-geometry, flux/orbifold
compactification, BCFW recursion, spinor-helicity, generalized unitarity,
color-kinematics, and ML-assisted modules (neural-calabi-yau-metric,
ml-hodge-prediction, rl-string-landscape).
@kalika/supersymmetry#
Supersymmetry (libs/kalika/supersymmetry/src): grassmann, superspace +
n2-superspace, superfields, and SUSY lagrangian construction.
@kalika/non-perturbative#
Non-perturbative field theory (libs/kalika/non-perturbative/src, ~28 files):
instantons (bpst-instanton, instanton-calculus, adhm, nekrasov),
monopoles, vortices, skyrmions, kinks, topological defects, and anomaly
machinery (chiral-anomaly, anomaly-polynomial/-descent/-inflow).
@kalika/bootstrap#
The conformal/S-matrix bootstrap (libs/kalika/bootstrap/src, ~14 files):
conformal-blocks, crossing-equations, analytic-bootstrap,
navigator-function, s-matrix-bootstrap, and sdp-bootstrap (numerical
bootstrap via SDP).
@kalika/resurgence#
Resurgence / asymptotic-series summation (libs/kalika/resurgence/src):
borel-summation, borel-pade, transseries, alien-calculus, and
perturbative-coefficients.
@kalika/mathematical-physics#
An aggregator facade (libs/kalika/mathematical-physics/src/index.ts, ~19
lines): re-exports six physics libraries (classical-mechanics,
electrodynamics, general-relativity, quantum-field-theory,
statistical-mechanics, string-theory) under namespaces plus a source-modules
constant — a top-level umbrella, no implementation of its own.
@kalika/nonlinear-dynamics#
Nonlinear dynamics & chaos (libs/kalika/nonlinear-dynamics/src):
dynamical-systems, lyapunov, poincare, fractals, route-to-chaos, and
standard systems.
@kalika/lattice#
Lattice gauge theory (libs/kalika/lattice/src, ~14 files): gauge-theory,
fermions, hmc (hybrid Monte Carlo), monte-carlo, measurements, and
gauge-configuration I/O.
@kalika/tensor-networks#
Tensor networks (libs/kalika/tensor-networks/src, ~15 files): mps, peps,
mera, dmrg, lattice-gauge, a generic tensor-network (the einsum
engine), and XXZ benchmarks.
@kalika/condensed-matter#
Condensed-matter physics (libs/kalika/condensed-matter/src): tight-binding,
hubbard-model, bcs-superconductivity, quantum-hall, and
topological-band.
@kalika/electronic-structure#
A pseudopotential / crystallography-and-DFT-types library
(libs/kalika/electronic-structure/src, ~73 TS files, ~17.9k lines). Its
implemented code (everything index.ts re-exports) lives in types (the bulk:
crystallographic and DFT data structures — atoms, lattices, k-point grids/paths,
space groups, symmetry finding, wavefunctions, charge density, band-structure
and DFT-calculation types), pseudopotential (relativistic pseudopotential
physics — Dirac radial solver, spin-orbit Hamiltonians, delta-factor /
equation-of-state validation, library registry), io (POSCAR/CONTCAR, CIF,
Quantum-ESPRESSO, XYZ, ABINIT and Materials-Project parsers/writers), runtime
(kernel loader), and constants (physical constants). The sibling directories
scf, plane-wave, band-structure, charge-analysis, xc, wannier,
parallel, and optimization are empty placeholder directories (each holds
only a .gitkeep, no .ts, none exported) — reserved slots, not yet a working
DFT solver. The one TS library that depends on the Rust
@kalika/numerical-engine.
@kalika/atomic-physics#
Atomic & molecular physics (libs/kalika/atomic-physics/src): hartree-fock,
molecular-physics, and spectroscopy.
@kalika/xc-functionals#
DFT exchange-correlation functionals (libs/kalika/xc-functionals/src, ~36
files, ~8.1k lines): organised by rung — lda, gga, and meta-gga modules
exposing many named functionals through the barrel.
@kalika/neural-physics#
Physics-informed machine learning (libs/kalika/neural-physics/src, ~16 files):
pinn + separable-pinn, deeponet, fourier-neural-operator,
neural-operator-pipeline, differentiable-physics, and training
infrastructure.
@kalika/symbolic-regression#
Symbolic regression / equation discovery (libs/kalika/symbolic-regression/src,
~17 files): genetic-programming, transformer-symbolic-regression,
llm-guided-symbolic-regression, physics-equation-discovery,
separability/symmetry detection, and AI-Feynman benchmarks.
@kalika/wannier#
A near-empty scaffold (libs/kalika/wannier/src/index.ts is a single line
exporting WANNIER_PACKAGE_NAME = '@kalika/wannier', plus a trivial spec). No
Wannier-function implementation lives here — and none lives anywhere else
either: electronic-structure/src/wannier/ is itself an empty placeholder
directory (.gitkeep only), and the only wannier references in Kalika TS are
the unrelated Wannier-center-flow (condensed-matter) and Kramers-Wannier
duality (statistical-mechanics/notebooks) uses, not Wannier-function
machinery. Shown as a reserved/placeholder slot, not a working library.
@kalika/bse#
Bethe-Salpeter excitonic optics (libs/kalika/bse/src, ~13 files):
electron-hole kernel assembly (bareExchangeElement, screenedDirectElement,
buildBseHamiltonian), Tamm-Dancoff (solveTdaBse) and full A/B-block
solutions (solveFullBse, beyondTdaCorrection), a Haydock-Lanczos spectrum
path (lanczosCoefficients), and optical outputs — absorption, oscillator
strengths, exciton binding energies and radiative lifetimes — plus 2D
keldyshPotential screening, singlet-triplet and spin-orbit excitons, and
kernel interpolation / k-grid extrapolation.
@kalika/cc-solids#
Coupled-cluster for solids (libs/kalika/cc-solids/src, ~730 lines):
canonical/spin-adapted/Laplace-transform MP2 (canonicalMP2, laplaceMP2 with
its own Laplace quadrature), CCSD correlation energy with DIIS acceleration
(ccsdCorrelationEnergy, diisExtrapolate), perturbative triples and EOM-CCSD
excitations (perturbativeTriples, eomCcsdExcitations), and
local-correlation/finite-size machinery — DLPNO pair-natural-orbital domains,
two-point CBS extrapolation, structure-factor finite-size corrections. Compact,
formula-level implementations; the CCD/FCI "two-electron" functions are analytic
2×2 minimal models used as exactness anchors.
@kalika/closed-loop-experiments#
Closed-loop autonomous-experiment coordination
(libs/kalika/closed-loop-experiments/src/index.ts):
orchestrateExperimentComputeLoop turns DoE candidate runs plus new
measurements into ranked recommendations, protocol requests, and a QC-gated
execution queue; updateSurrogateModels applies weight-averaged moment-based
posterior mean/variance updates — deliberately lightweight Bayesian bookkeeping,
not the GP regression that lives in @kalika/surrogate — and
learnDiscrepancyModel fits per-modality simulation-vs-experiment residual
statistics. Four domain planners (planBatteryClosedLoopCampaign,
planCatalystClosedLoopCampaign, thin-film, structural-alloy) template concrete
campaigns.
@kalika/crystallography#
A very large crystallography & solid-state library
(libs/kalika/crystallography/src, ~209 files, ~25.6k lines): Bravais lattices
with Niggli reduction (lattice/niggli-core.ts), the 230 space groups with Hall
symbols, detection and xyz operator algebra (space-group/), Hinuma-convention
Brillouin-zone k-paths (reciprocal/hinuma.ts), diffraction with form factors,
systematic absences and Le Bail fitting (diffraction/lebail.ts), crystal
chemistry (bond valence, coordination polyhedra, porosity, prototypes),
surfaces/interfaces (Wulff construction, CSL grain boundaries, moiré), magnetic
Shubnikov groups, space-group irreps/corepresentations and distortion modes, and
symmetry-adapted tensor properties (Neumann, elastic, Landau). Structure I/O
covers CIF/POSCAR and more, with COD and Materials-Project database clients.
@kalika/dmft#
Dynamical mean-field theory (libs/kalika/dmft/src, ~20 files): a Bethe-lattice
runDmft self-consistency loop with Matsubara Green's functions and
chemical-potential adjustment, a segment-representation CT-HYB
hybridization-expansion Monte-Carlo impurity solver (runCtHyb, deterministic
Mulberry32 PRNG), exact-diagonalization and Wilson-chain NRG solvers
(nrgIterativeDiagonalization on a logarithmic mesh), analytic continuation by
Padé / MaxEnt / Nevanlinna / stochastic methods, cRPA/cLDA interaction-
parameter estimation with Slater-Kanamori conversion, and extended-DMFT /
DFT+DMFT workflow glue with quasiparticle-weight and Mott-transition
observables.
@kalika/doe#
Design of experiments for lab campaigns (libs/kalika/doe/src/index.ts, ~1.9k
lines, single module): classical designs — full/fractional factorial,
plackettBurmanDesign, Taguchi arrays, latinHypercubeDesign, greedy
dOptimalDesign over a candidate set, central-composite responseSurfaceDesign
— filtered by lab-aware constraints (applyDoeConstraints: forbidden
combinations, simplex/mixture, process windows, equipment throughput, precursor
inventory), then Bayesian-optimization candidate ranking with
expected-improvement / UCB / constrained-EI acquisitions, active-learning
planning, adaptive replicate allocation, portfolio scheduling, and campaign
outputs (plate maps, batch sheets, instrument queues, requisitions).
@kalika/electron-phonon#
Electron-phonon coupling (libs/kalika/electron-phonon/src, ~860 lines):
deformation-potential and Fröhlich matrix elements with Bloch↔Wannier transforms
and a long-range polar correction for interpolation (froehlichMatrixElement,
blochToWannier), the Eliashberg spectral function α²F with λ, ω_log and
mode-resolved decomposition (alpha2F, couplingConstant), Fan-Migdal +
Debye-Waller self-energies for zero-point/temperature band-gap renormalization,
SERTA and iterative-BTE phonon-limited mobility with Seebeck-Mott and
Hall-factor helpers, and Kohn-anomaly/nesting analysis. Compact but
named-formula real; the full gap solvers live in @kalika/eliashberg.
@kalika/eliashberg#
Eliashberg superconductivity (libs/kalika/eliashberg/src): isotropic
imaginary-axis Matsubara gap equations (solveEliashberg,
criticalTemperature, gap-vs-temperature), McMillan and Allen-Dynes Tc with
Morel-Anderson μ* (allenDynesTc, morelAndersonMuStar), multiband and
anisotropic gap equations (solveMultibandEliashberg,
solveAnisotropicEliashberg), Padé analytic continuation plus a direct
real-axis solver with tunneling DOS (solveRealAxisEliashberg), and derived
properties — gap ratio, specific heat, isotope exponent, strong-coupling shape
factor.
@kalika/embedding#
Multiscale embedding (libs/kalika/embedding/src, ~375 lines): frozen-density
embedding with Thomas-Fermi / von Weizsäcker kinetic functionals and
freeze-and-thaw cycles (fdeEmbeddingPotential, freezeAndThaw), QM/MM with
electrostatic embedding, hydrogen link atoms and ONIOM2/3 subtractive layering,
and many-body/defect embedding — Manby-Miller projectionEmbedding,
Green's-function defect embedding, the Freysoldt-Neugebauer-Van de Walle
fnvCorrection, defect formation energies and transition levels. Compact
scalar-and-small-matrix formula implementations, not a full SCF engine.
@kalika/experiment-orchestration#
The typed backbone of the lab-automation family
(libs/kalika/experiment-orchestration/src): model.ts defines campaigns,
hypotheses, budgets, facility constraints, ExecutableProtocol steps with
tolerances/branches/QC gates, sample-lineage graphs, InstrumentSession, and
the SafetyEnvelope rule types that @kalika/instrument-control and
@kalika/lab-safety import; integration.ts builds an
ExperimentStackManifest (createExperimentStackManifest) linking a campaign
to @kalika/notebooks, @kalika/research-agents and @kalika/knowledge-graph.
Honestly a schema-plus-constructors model layer — the coordination contract, not
an executor.
@kalika/gw#
GW quasiparticle theory (libs/kalika/gw/src, ~27 files): Adler-Wiser RPA χ₀
(assembleRpaChi0, head/wing/body blocks), dielectric matrix and screened
interaction with Coulomb truncation, plasmon-pole models — Hybertsen-Louie,
Godby-Needs, and Engel-Farid multipole — one-shot G0W0 (solveG0W0, spectral
functions, DFT-starting-point analysis), static COHSEX, full-frequency
self-energies, eigenvalue-self-consistent GW and QSGW (runQsgw, with a BSE
hand-off), space-time-method pieces, and convergence tooling (band-count /
G-cutoff / k-point extrapolation, static-remainder correction) under a
runGwWorkflow driver.
@kalika/instrument-control#
A typed instrument control plane (libs/kalika/instrument-control/src/index.ts,
~1.2k lines): InstrumentDriver capability/command schemas with parameter
validation (validateInstrumentCommand), a connection-state machine, a
STANDARD_ACQUISITION_ADAPTERS catalog spanning
XRD/Raman/XPS/SEM/TEM/AFM/electrochemistry modalities, facility sessions with
manifest export and archive sync, calibration assessment (assessCalibration),
acquisition-template materialization, in-run QC that emits reacquisition
commands (evaluateInRunQc), and streaming partial-dataset dispatch. Honestly a
control-plane model: no VISA/serial/ vendor-SDK transport is implemented here —
InstrumentDriver is the seam a real hardware driver must fill.
@kalika/lab-safety#
Fail-closed safety gating for autonomous lab work
(libs/kalika/lab-safety/src/index.ts, ~1.25k lines): a chemical/process hazard
knowledge base compiled into a SafetyEnvelope (buildSafetyEnvelope),
protocol-DSL validation against incompatibility/PPE/exposure rules
(validateProtocolSafety), per-step execution gating with operator credentials
and approval signatures (gateProtocolStep), pre-flight review packets, an
incident/near-miss ledger, and exportable audit traces. Pure policy/validation
logic over @kalika/protocols documents — it decides and blocks; it does not
actuate hardware.
@kalika/many-body#
The shared numerical substrate of the GW/BSE family
(libs/kalika/many-body/src, ~56 files, ~7.6k lines): Matsubara/real-axis
Green's functions, χ₀ polarizability and the ε(G,G′,q,ω) dielectric matrix with
dense inversion and local-field ε_M, bare/truncated Coulomb v(q+G), radix-2
Cooley-Tukey FFT with exact-DFT fallback, k-point / imaginary-time / Matsubara
grids, ScaLAPACK-style block-cyclic parallel-layout, HDF5 checkpointing, a
BerkeleyGW bgw-compat layer, and wavefunction I/O for VASP, Quantum ESPRESSO,
ABINIT, GPAW and Wannier90. The compute-backend GPU path is a fail-loud seam:
selectComputeBackend currently always falls back to the real CPU kernels
because the napi-rs/wgpu addon is not bundled — it never fabricates GPU output.
@kalika/many-body-benchmarks#
Validation-only companion to the many-body family
(libs/kalika/many-body-benchmarks/src, ~475 lines): reference-data.ts stores
literature reference values (semiconductor and transition-metal-oxide gaps,
exciton binding energies, HEG energy per electron, SrVO₃ Hubbard bands, diamond
cohesive energy) and benchmarks.ts scores computed results against them
(gw100Benchmark, tmoGapBenchmark, bseOpticalSpectraBenchmark,
srvo3Benchmark) via errorStatistics pass/fail verdicts. A testing/validation
library — it checks results; it computes no physics of its own.
@kalika/molecular-dynamics#
Atomistic simulation (libs/kalika/molecular-dynamics/src, ~71 TS files, ~7.1k
lines, plus ~6.2k lines of Rust in
rust/crates/{md-core,md-potentials,md-analysis}): the TS layer carries
VelocityVerlet + MDRunner classical-MD orchestration, enhanced sampling
(metadynamics BiasPotential, nudgedElasticBand, string method, WHAM/MBAR),
free-energy estimators (thermodynamicIntegration, bennettAcceptanceRatio,
Jarzynski/Crooks), coarse-graining (DPD, iterative Boltzmann inversion, force
matching), random-search structure prediction, and wide trajectory I/O
(PDB/GRO/DCD/TRR/LAMMPS-data/POSCAR/restart). The Rust crates implement
EAM/Stillinger-Weber/Tersoff potentials, thermostats/PBC, and Green-Kubo thermal
conductivity / shear viscosity (green_kubo.rs) — but are cargo-tested only,
with no napi/wasm bridge into the TS layer yet.
@kalika/phonons#
Harmonic lattice dynamics (libs/kalika/phonons/src, ~58 files, ~6.7k lines):
finite-displacement force constants with symmetry-reduced displacement sets and
orbit averaging (generateDisplacements, extractForceConstants),
acoustic-sum-rule enforcement and space-group symmetrization, dynamical matrices
with Born-charge LO-TO non-analytic correction and Gonze-Lee damping
(dynamicalMatrixWithNAC), dispersion/DOS with linear tetrahedron integration
(tetrahedronDOS), instability detection, and thermodynamics — harmonic free
energy, Grüneisen parameters, and quasi-harmonic runQHA over Birch-Murnaghan
EOS fits (Gibbs energy, Cp). Parses VASP OUTCAR / QE forces and phonopy BORN
files.
@kalika/phonons-anharmonic#
Anharmonic lattice dynamics (libs/kalika/phonons-anharmonic/src, ~1k lines):
third-order force-constant extraction from irreducible displacement triplets
with permutation symmetrization and a third-order acoustic sum rule
(extractThirdOrderFC), three-phonon matrix elements with Bose factors and
normal/Umklapp classification (classifyProcess), scattering rates turned into
linewidths, lifetimes and frequency shifts, joint DOS, and adaptive-broadening /
cutoff / q-mesh convergence analysis. A direct dependency of
@kalika/thermal-transport.
@kalika/phonons-dfpt#
DFPT phonons (libs/kalika/phonons-dfpt/src, ~700 lines): a Sternheimer
linear-response kernel — conduction-projected sternheimerSolve, first-order
density, selfConsistentResponse — Fourier interpolation of dynamical matrices
over Wigner-Seitz vectors with polar splitting (interpolateDynamicalMatrix),
response properties (Raman tensor, elastic and piezoelectric constants from
strain response), and a checkpointed SCF → ph.x → force-constant recovery →
dispersion pipeline (runDfptWorkflow) with longest-processing-time q-point
load balancing. The DFT stages are supplied as engine callbacks (Quantum
ESPRESSO or another engine); a missing callback fails loud rather than
simulating the run.
@kalika/phonons-special#
Phonons in special systems (libs/kalika/phonons-special/src, ~1.1k lines):
Kapitza interface conductance via acoustic-mismatch and diffuse-mismatch models
plus atomistic-Green's-function transmission and Landauer conductance
(ammConductance, dmmConductance, agfTransmission), alloy/disorder tools
(VCA averaging, SQS pair-correlation error, CPA self-energy, band-unfolding
weights), spectroscopy (Raman/IR, one-phonon INS/IXS with powder averaging,
dynamical structure factor), surface slab phonons, 2D flexural ZA-mode
dispersion/DOS, and pressure/strain/temperature conditions.
@kalika/polarons#
Polaron physics (libs/kalika/polarons/src, ~660 lines): Fröhlich weak-coupling
perturbation energy plus the all-coupling Feynman path-integral variational
bound minimized over (v, w) (weakCouplingEnergy, feynmanEnergy), Holstein
small polarons via the Lang-Firsov transformation with independent-boson ground
state and tridiagonal-Lanczos lowest eigenvalues (langFirsov,
polaronCrossover), bipolaron binding / effective mass / BEC temperature, and
transport — thermally activated hoppingMobility, band-to-hopping crossover,
photoemission phonon sidebands and quasiparticle residue.
@kalika/protocols#
The experiment-protocol DSL and execution model
(libs/kalika/protocols/src/index.ts, ~1.6k lines): typed step kinds
(synthesis, annealing, mixing, deposition, curing, transfer, characterization)
in a ProtocolDslDocument, compileProtocol to backend commands,
dryRunProtocol simulation against a declared environment (inventory,
equipment, QC gates), a stateful execution machine (createProtocolExecution,
startNextProtocolStep, sign-offs, pause/resume, exceptions + recovery plans,
evidence, checkpoints), and connector planners for liquid handlers (dispense
commands, dilution trees, tip management), thermal/deposition processes, and
robotic transfer. Connector "plans" are typed command sequences for downstream
drivers — no vendor hardware I/O lives here.
@kalika/qmc#
Quantum Monte Carlo (libs/kalika/qmc/src, ~1.4k lines): Metropolis VMC with
cusp-conditioned Jastrow factors and Slater log-determinants (runVmc,
jastrowFactor), fixed-node importance-sampled DMC with drift-diffusion moves,
population control, and time-step extrapolation (runDmc, validated against the
exact hydrogen −0.5 Ha ground state), phaseless AFQMC (discrete
Hubbard-Stratonovich decomposition, phaselessWeight, back-propagation),
solid-state machinery (Ewald energy, B-spline orbitals, Hellmann-Feynman + Pulay
forces, twist averaging, KZK and MPC finite-size corrections), and
blocking-analysis error bars with autocorrelation times (blockingAnalysis),
all on a deterministic Mulberry32 PRNG.
@kalika/research-ops#
Federated research operations (libs/kalika/research-ops/src, ~1.9k lines): a
FederatedSiteRegistry with access-policy evaluation and cross-site replication
planning, SHA-256 content-hash provenance signing (canonicalize/contentHash,
signProvenance), an ImmutableArtifactRegistry with integrity reports,
retention classes and checkpoint-cadence rules, execution-environment capture
exported as Spack/Nix/container recipes with validation, workflow replay bundles
gated by a fail-loud assertProductionReady, and a LicenseAwareScheduler with
fair-share priorities. Governance and bookkeeping logic — it does not itself run
the computations it tracks.
@kalika/response#
Linear-response and dielectric properties (libs/kalika/response/src, ~340
lines): the Dyson equation for the interacting susceptibility (dysonResponse),
static Lindhard function, charge susceptibility and compressibility, macroscopic
dielectric constant / loss function / optical constants and joint DOS, plus
sum-rule diagnostics — f-sum and conductivity sum rules, plasma frequency, and a
Kramers-Kronig transform with residual check (kramersKronigResidual). A
compact formula-level companion to @kalika/many-body's full ε(G,G′,q,ω)
machinery.
@kalika/sample-ops#
Sample lifecycle operations (libs/kalika/sample-ops/src/index.ts, ~1.5k
lines): hazard-aware inventory assessment against facility rules
(assessInventory), sample registration with barcode/QR/RFID tags over
@kalika/experiment-orchestration lineage types, plate/wafer/single-sample
container builders with position maps, a digitally signed chain-of-custody
ledger (appendChainOfCustodyEvent), batch/queue planning for characterization,
annealing and beamtime, and contamination-rule co-processing validation
(validateCoProcessing). Pure typed ledger/planning logic — the LIMS brain, not
a robot.
@kalika/tddft#
Time-dependent DFT (libs/kalika/tddft/src, ~420 lines): Casida-equation
excitations in full and Tamm-Dancoff form (solveCasida), exchange-correlation
kernels — ALDA, gradient-corrected, hybrid, and long-range-corrected with α from
ε∞ (aldaKernel, lrcKernel) — real-time propagation via unitary
Crank-Nicolson steps with dipole-to-absorption spectra, Bloch current, and an
Ehrenfest nuclear step (crankNicolsonStep, ehrenfestStep), plus a
TDDFT-vs-BSE spectrum comparison and kernel ranking (compareTddftBse).
Formula-level model dimensions, not a plane-wave TDDFT code.
@kalika/thermal-transport#
Lattice thermal conductivity (libs/kalika/thermal-transport/src, ~1.1k lines,
depends on @kalika/phonons + @kalika/phonons-anharmonic): phonon-BTE solvers
from RTA through iterative, direct, and variational-bound forms (kappaRTA,
iterativeBTE, directBTE, variationalBound), mode-resolved and
temperature-dependent κ, scattering mechanisms — Tamura isotope mass-variance,
Casimir boundary, alloy, T-matrix and four-phonon rates combined by
Matthiessen's rule — and spectral analysis: mean-free-path accumulation, a
Wigner coherent-transport contribution (wignerCoherentKappa), and
ballistic-diffusive suppression.