Stereochem

 

Stereochem is a browser-based molecular editor built by Mike Hoang for drawing structures in 2D and exploring them in 3D. Students, teachers, and other users can work with molecules without installing a desktop application. It combines a React and TypeScript interface with a C++ chemistry core compiled to WebAssembly.

 

By Mike Hoang · Last updated: 2026-10-06

 
 
Stereochem — a browser workspace for drawing and exploring molecules
Stereochem — a browser workspace for drawing and exploring molecules
 

Why I built it

 

My girlfriend was using a desktop molecular editor that wasn't very user-friendly. Sharing her work and taking screenshots were harder than they needed to be, so I built a browser-based version on top of its core engine to make those everyday tasks easier.

 

I keep adding features whenever she thinks of something that would be useful to her. Her ideas and the way she uses the app guide what I build next.

 

How I built it

 

I compiled Avogadro's C++ chemistry libraries to WebAssembly using Emscripten, then built a React and TypeScript interface around them. WebGL2 renders the 3D molecules, while RDKit handles SMILES parsing and stereochemistry labels.

 

The app is built with Vite. Cloudflare Workers and Durable Objects support live sharing rooms, with Yjs managing shared state.

 

Stereochem project facts

 
DetailValue
Project year2026
Editing views2D sketching and 3D inspection
Import formats7: SMILES, MOL, SDF, XYZ, PDB, CML, CJSON
Interface and renderingReact, TypeScript, WebGL2
ChemistryAvogadro C++ libraries compiled to WebAssembly; RDKit
CollaborationCloudflare Workers, Durable Objects, Yjs
 

The format count comes from the import list below.

 

Can I use Stereochem without installing software?

 

Yes. Open Stereochem in a browser to draw and explore molecular structures. The C++ chemistry core runs through WebAssembly, and WebGL2 renders the 3D view. The editor guides explain how to use it.

 

Challenges

 
  • Moving desktop chemistry into the browser: I separated the portable chemistry core from the desktop UI and exposed it through WebAssembly bindings.
  • Checking numerical behavior: I compared native and WASM results on the same molecular files to catch differences introduced by the port. Matching outputs also needed documented tolerances for floating-point calculations.
  • Keeping editing responsive: Geometry optimization runs in a Web Worker with its own copy of the chemistry core, so calculations don't block the interface. Results from an outdated molecule are discarded when the user makes another edit.
 

Features

 
  • 2D sketching: Draw atoms and bonds, use wedges and hashes, and insert rings or saved fragments.
  • 3D inspection: Rotate molecules and inspect bond lengths, angles, formula, molar mass, and UFF energy.
  • Stereochemistry: Display R/S and E/Z labels assigned by RDKit.
  • Compound lookup: Start from a SMILES string or find a compound by name through PubChem.
  • Reaction schemes: Arrange structures and arrows on an editable reaction sheet.
  • Import and export: Import SMILES, MOL, SDF, XYZ, PDB, CML, and CJSON; export molecular files or images.
  • Live sharing: Work together in a shared editing room.
 
Caffeine in the 3D viewer, with molecular properties and UFF energy in the inspector
Caffeine in the 3D viewer, with molecular properties and UFF energy in the inspector
 
The reaction editor — arrange structures and arrows on an editable sheet
The reaction editor — arrange structures and arrows on an editable sheet
 

About the developer

 

Mike Hoang is a full-stack developer in Vancouver. Read about his BetweenUs Flutter app or contact Mike.

claude ── ready
✻ Welcome to mike's terminal
  ask anything about him, his work, or the files on the left
  cwd: ~/mikah13
Try:
enter to send