tm-spec

Lit-Review: Metalanguages for Scientific Data Description

Date: 2026-05-09. Audience: self-study prior to extending TM-Spec. Goal: understand what is already standardised, to avoid reinventing the wheel and instead borrow best practices layer by layer.


TL;DR

There is no universal “physics/chemistry language.” What exists is a stack of established domain languages, organised by layer. The most “code-like” ones in our zone:

Domain Best language Why
Reaction dynamics (CRN/kinetics) Antimony 3 Text like J0: A->B; k1*A, converts to SBML, reads like code
Atomistics (DFT/MD inputs) ASE Python Python as de facto DSL over QE/VASP/GPAW/CP2K
Defect chemistry Kröger-Vink Defect equations with charges and sites
Hydrothermal environment PHREEQC input KEYWORD-blocks + balanced equations, all in one file
Phase thermodynamics CALPHAD TDB A real DSL for Compound Energy Formalism
Crystal structure AFLOW prototype + CIF AB_tP4_129_a_c — compact signature
Cross-DFT interoperability NOMAD Metainfo Parsers for ~40 codes
Materials database queries OPTIMADE Unified filter language
Reproducibility AiiDA Workflow + provenance graph

Part 1. Generic / Organic Languages

1.1. Structure (static)

1.2. Reaction networks — “programming like code”

Antimony — the most readable

A text front-end for SBML, developed by the Sauro lab (U. Washington):

J0: A -> B; k1*A
J1: B -> C; k2*B
k1 = 0.1; k2 = 0.5; A = 10

Antimony 3 (2024–2025) added FBC, Layout, annotations, and distributions. The closest to a “reads like a program” answer for CRN/dynamics.

Rule-based

Kinetics

1.3. DFT / atomistics — no unified language

Each code has its own format: QE namelists, VASP INCAR, ABACUS INPUT, GPAW Python, CP2K input sections, ORCA keyword lines. Unification attempts:

1.4. Force fields

1.5. Experiment / laboratory

1.6. Recent developments 2025–2026

  1. Antimony 3 — major update; now covers constraint-based modelling (FBA), distributions, and layout. Closest to a “program in a language” for chemical dynamics.
  2. MobsPy — Python DSL for biochemical reaction networks, object-oriented on top of the BNGL idea.
  3. LangSim (MPIE) — LLM front-end over atomistic simulation: write in plain English, an agent calls ASE/pyiron underneath. Not a metalanguage but a natural-language interpreter into ASE.
  4. Foundation models for atomistic simulation (Nat Rev Chem 2025) — a review showing that the field is not converging on a unified language, but on unified representations (graph + species embeddings).

Part 2. Inorganic / Materials Science

2.1. Crystal structure

2.2. Defect chemistry — ⭐ a genuine DSL

Kröger-Vink notation — equations that function as code:

nil → V_M''  + V_X^••           (Schottky)
M_M^× + X_X^× → V_M''  + V_X^•• + M_i^•• + X_i''   (Frenkel)
2·Fe_Fe^× + ½ O₂(g) → 2·Fe_Fe^•  + V_Fe''  + O_O^×   (acceptor doping)

Written as a reaction equation using standard notation:

90% readable after one page of a textbook. No official ASCII standard exists, but pymatgen.analysis.defects and doped (Walsh group, 2024) encode this in Python objects.

2.3. Surfaces

2.4. Magnetic structure

2.5. Phase thermodynamics — ⭐ a genuine DSL

CALPHAD TDB format (Thermo-Calc, OpenCalphad, pycalphad, ESPEI) — text-based databases:

PHASE LIQUID:L %  1  1.0 !
CONSTITUENT LIQUID:L : FE,S : !
PARAMETER G(LIQUID,FE;0)  298.15  GFEL;  6000 N !
PARAMETER L(LIQUID,FE,S;0)  298.15  -104888.7+0.338*T;  6000 N !

Compound Energy Formalism — a real program in a DSL for thermodynamic modelling. Recent (2025): coupling with MLIPs (MACE-MP / UMA) for automatic parameter fitting. For our Fe-S, Ni-S context, the CALPHAD databases SGTE PURE5 + SSUB already contain FeS, FeS₂, Fe₃S₄.

2.6. Aqueous / hydrothermal systems — ⭐⭐ relevant to our project

PHREEQC input (USGS) — already installed (phreeqpython). A pure KEYWORD-DSL with balanced chemical equations:

SOLUTION 1
    pH 6.5
    temp 90
    Fe(2) 1.0e-3
    S(-2) 5.0e-4
SOLUTION_SPECIES
    Fe+2 + HS- = FeHS+ ; log_k 5.30
PHASES
    Mackinawite
    FeS + H+ = Fe+2 + HS- ; log_k -3.6
KINETICS
    Pyrite_oxidation
    -m0  1e-6
    -formula  FeS2 + 3.5 H2O + 1.75 O2 = Fe(OH)3 + 2 SO4-2 + 4 H+
RATES
    Pyrite_oxidation
    -start
    10  rate = parm(1) * (m/m0)^0.67 * act("O2")^0.5
    20  save rate * time
    -end

One file = complete model: speciation + minerals + kinetics + transport. Close to ideal for our purposes.

Alternatives (same class, different flavour):

2.7. Databases and queries

2.8. Force fields / MLIP

2.9. Mineralogy

2.10. Generative / LLM-friendly (2024–2026)


Sources

Part 1 (generic / organic)

Part 2 (inorganic / materials science)

Additional (not from search, widely known)