Skip to content

Home

# Cheminformatics that runs entirely in your browser

A compact Rust and WebAssembly chemistry engine for interactive tools, local analysis, and serverless applications — plus native Rust and Python bindings from the same codebase. No backend required for supported browser workflows.

CI PyPI crates.io npm


Runs locally, ships light, one core everywhere

Runs locally. Supported analysis (parsing, descriptors, fingerprints, similarity search, 2D depiction) executes inside the browser's own WASM sandbox — the molecule data you type or upload is never sent to a chematic server. The Local Compound Explorer and Playground are both static pages with no backend of their own. (This describes chematic's own browser tools; if you build a product on top of chematic-wasm that calls other network APIs, that's your own code's choice, not something chematic does on your behalf.)

Lightweight deployment. The WASM bundle is 2.94 MB raw / 1.10 MB gzip, measured 2026-08-21 from a clean release build (wasm-pack build --target web --release + wasm-opt -O3, commit ef7dc25) — see docs/rdkit-comparison.md for the full methodology and how this compares to RDKit.js.

One Rust core, multiple interfaces. The same chematic-* Rust crates back the native Rust API, the Python bindings (pip install chematic), and the WASM/JavaScript bindings (npm install @kent-tokyo/chematic) — one implementation, not three ports to keep in sync.


30 seconds of chematic

import init, { parse_smiles } from "@kent-tokyo/chematic";
await init();

const mol = parse_smiles("CC(=O)Oc1ccccc1C(=O)O");  // aspirin
console.log(mol.molecular_weight(), mol.tpsa(), mol.lipinski_passes());
// 180.16  63.6  true
mol.free();
use chematic::{smiles, chem};

let mol = smiles::parse("CC(=O)Oc1ccccc1C(=O)O").unwrap();  // aspirin
println!("{:.2} {:.1}", chem::molecular_weight(&mol), chem::tpsa(&mol));
// 180.16 63.6
import chematic

mol = chematic.from_smiles("CC(=O)Oc1ccccc1C(=O)O")  # aspirin
print(mol.mw, mol.tpsa, mol.lipinski_passes)
# 180.16  63.6  True

Pick your entry point

### Browser developers - JavaScript / TypeScript, native WASM (no Emscripten) - No backend for supported local workflows - SVG 2D depiction, descriptors, fingerprints, similarity search - [Browser integration guide →](use-cases/browser-app.md)
### Rust developers - Native Rust API, `cargo add chematic` - Zero C/C++ toolchain in the standard pure-Rust path - Embeds in servers, CLIs, and embedded targets - [Rust server guide →](use-cases/rust-server.md)
### AI developers - Built-in MCP server, 20 structured chemistry tools - Runs locally over stdio — no hosted service - Does not implement remote/HTTP MCP transports - [AI-assisted analysis guide →](use-cases/ai-drug-discovery.md)
### Python users - `pip install chematic` — prebuilt wheels, no C/C++ compiler needed - Jupyter-friendly inline SVG rendering, pandas DataFrame export - RDKit-familiar API subset — not a full drop-in replacement - [Python notebook guide →](use-cases/python-notebook.md)

Common use cases

Scenario How chematic helps
Local compound triage Local Compound Explorer — load a CSV/SDF, filter, sort, and export, entirely client-side
Browser app 1.10 MB gzip WASM bundle, zero backend required, React/Vue/Svelte ready
Drug screening 190+ descriptor values, ADMET, PAINS/Brenk, QED — batch over thousands of compounds
AI agent / MCP Built-in MCP server — Claude Desktop can call chemistry tools directly
Batch analysis Rayon-parallel descriptor/fingerprint/3D pipelines; SDF/CSV in, CSV out
Rust server Pure-Rust crates with no C/C++ toolchain; Axum/Actix compatible

Full worked examples → Use cases


Honest comparison

chematic RDKit (Python) RDKit.js (WASM)
Install pip install chematic pip install rdkit (official prebuilt wheels) or conda npm install @rdkit/rdkit, no Python bindings
C/C++ toolchain Not required, even building from source Not required for the prebuilt wheel; required building from source Not required by consumers of the published package
Browser / WASM Yes — 2.94 MB raw / 1.10 MB gzip Not applicable (Python/C++ library) Yes — 6.91 MB raw (RDKit_minimal.wasm; a separate community project, currently in a maintainer transition)
pKa / ADMET prediction Built-in, rule-based screening — not for clinical use External tool required External tool required
AI agent / MCP integration Built-in, 20 tools (stdio only)
Ecosystem maturity Growing (2024–) Established (2006–) Established, but the WASM distribution specifically is community-maintained

Bundle sizes measured 2026-08-21 (commit ef7dc25); chematic vs RDKit.js compared on a raw-to-raw basis since RDKit.js's gzip-over-the-wire size was not independently measured. Full detail, including where chematic is weaker: Detailed RDKit comparison.


Validation

Descriptor accuracy is measured against RDKit on a 4,999-molecule ChEMBL-derived corpus: MW, HBA, HBD, TPSA, LogP (Crippen), molar refractivity, Fsp3, and ring/stereocenter counts all reach 100% agreement (LogP within float64 rounding error). Full breakdown, known residuals, and reproduction commands: Validation report.


When to use chematic

  • You want chemistry in the browser (WASM, 1.10 MB gzip, no server required)
  • You need a pure Rust stack with no C++ toolchain dependencies
  • You deploy to environments where installing RDKit is impractical (Cloudflare Workers, Lambda, embedded)
  • You build AI agents and want native MCP tool integration
  • You want pip install chematic to just work, anywhere, no compiler needed

When to use RDKit

  • You need maximum ecosystem compatibility and 20+ years of production validation
  • You need publication-quality 3D structures with ML-assisted torsion corrections (ETKDGv3)
  • You depend on community plugins written against the RDKit Python API
  • You need bit-exact standard InChI without enabling an opt-in feature