Reactions
A reaction has reactants, an arrow, and products. Conditions sit in bracketed groups immediately after the arrow.
Arrow types
Section titled “Arrow types”| Arrow | Kind | Use |
|---|---|---|
-> | :forward | Net forward reaction |
<- | :reverse | Net reverse reaction |
<=> | :equilibrium | Equilibrium (Haber, acid/base) |
<=>+ | :donation | Equilibrium carrying an electron-pair donation (mhchem’s form) |
<=>- | :removal | Equilibrium carrying an electron-pair removal |
<-> | :resonance | Resonance structures |
Basic reactions
Section titled “Basic reactions”2H_2 + O_2 -> 2H_2O
HCl + NaOH -> NaCl + H_2O
CH_4 + 2O_2 -> CO_2 + 2H_2Oasciichem gem to see this rendered.
Reactants and products are each a +-separated list of molecules. The
+ operators are stripped from the model; the renderer reinserts them.
Donation arrows
Section titled “Donation arrows”The equilibrium arrow carries an electron-pair marker the way mhchem
spells it — <=>+ donates a pair onto the equilibrium, <=>- removes
one; conditions still attach after the marker:
A <=>+ B
A <=>-[hv] Basciichem gem to see this rendered.
The MathML renderer emits the marker beside the equilibrium glyph
(⇌⁺ / ⇌⁻); the canonical text round-trips verbatim.
Equilibrium with conditions
Section titled “Equilibrium with conditions”The Haber process — nitrogen and hydrogen over an iron catalyst at elevated temperature:
N_2 + 3H_2 <=>[Fe][400°C] 2NH_3asciichem gem to see this rendered.
The first bracketed group [Fe] is the above condition (catalyst).
The second bracketed group [400°C] is the below condition
(temperature). Both are captured as Reaction#conditions.
The MathML renderer emits the arrow as an <munderover>:
<munderover> <mo>⇌</mo> <mtext>Fe</mtext> <mtext>400°C</mtext></munderover>One-sided conditions
Section titled “One-sided conditions”Only the above condition:
A <=>[H_2O] Basciichem gem to see this rendered.
Only the below:
A <=>[Δ] Basciichem gem to see this rendered.
(Use the second form when the condition is energy/heat, by convention placed below the arrow.)
Structured role entries
Section titled “Structured role entries”A condition can name its role explicitly when the above/below convention is not the whole story:
A + B ->[cat: Pd; base: Na_2CO_3][solv: THF] Casciichem gem to see this rendered.
cat/catalyst, solv/solvent, and reag/reagent prefixes
produce typed entries (Conditions#entries); ; separates entries
inside one bracket; anything else stays free text. The bracket text
is preserved verbatim, so the round-trip stays exact. See
the Reaction model for
the entry shape.
Spectators and ionic equations
Section titled “Spectators and ionic equations”Ag^+ + Cl^- -> AgClasciichem gem to see this rendered.
Ions on either side are full Molecule instances with their charge
captured on the relevant atom. Round-trip is exact.
What’s not yet in v1
Section titled “What’s not yet in v1”- Reversible resonance is supported; tautomerism arrows are not.
- Multi-step reactions (chained arrows) require explicit Reaction nodes per step.
- Rates and stoichiometry validation are out of scope for the parser — a separate linter pass can verify balancing.