Skip to content

Implementations

One model · Three implementations · One contract

Type once. The same bytes come out, whichever you ship.

Every implementation passes theshared corpus byte-for-byte — proof the model, not the notation, is the canonical form.

Ruby
asciichem
gem install asciichemReference implementation.
TypeScript
asciichem-ts
npm install asciichemPowers this page.
Python
asciichem-py
pip install asciichem-pyZero runtime deps.

AsciiChem is a contract, not a codebase. The contract has two halves: the wire form (asciichem-model — versioned JSON Schemas plus generated types) and the conformance corpus (asciichem-tests — the fixtures every implementation must pass in its own CI). Anything that passes both is AsciiChem.

This is the single-contract rule: there is no “the parser”. There is the reference implementation and its equals.

Implementationparse / rejectL0L1L2SMILESmolfileCMLlinter
Rubyasciichem gem · referenceclaimedclaimedclaimedclaimedclaimedclaimedclaimedclaimed
TypeScriptasciichem · npmclaimedclaimedclaimedclaimedclaimedclaimednot yet claimednot yet claimed
Pythonasciichem-pyclaimedclaimedclaimedclaimedclaimedclaimednot yet claimednot yet claimed

Filled cells are claimed at 100% of the asciichem-tests corpus, verified in each implementation's CI. The Ruby gem is the reference; a claim is only as good as the shared corpus behind it.

Ruby — asciichem

gem install asciichem — the reference. Full formatter set, citations, InChI identity, linter, CLI. Ruby →

TypeScript — asciichem-ts

npm install asciichem — runs in the browser and Node. Powers this page. TypeScript →

Python — asciichem-py

pip install asciichem-py — zero runtime deps, plain dataclasses. Python →

  • Documents and standards pipelines (Ruby) — the gem integrates with Metanorma-style publishing; CML round-trip for interchange; the CLI covers parsing, rendering, linting, resolving, validation.
  • Web and interactive tools (TypeScript) — parse and draw chemistry client-side; the corpus guarantees the same acceptance as the reference, so your web previews match your build-time renders.
  • Data and science workflows (Python) — zero-dependency parsing into plain dataclasses; wire JSON in and out for pipelines.

All three speak the same wire form, so structures move freely between ecosystems.

asciichem-model

The contract repository: LUTAML definitions, v1 schemas, examples, generated TypeScript types. Not a package — implementations vendor from tags.

asciichem-tests

The shared corpus: parser acceptance, identifiers, CML round-trip, fuzz, linter expectations, structure fixtures. Never edited to make an implementation pass.

asciichem.github.io

This site — the specification, rendered examples, and the live playground.

Play