Chris Collins

Tools · chemistry

Molecule viewer (SMILES)

Type a SMILES string, a molecular formula or a name (about 630 molecules built in, plus PubChem search) to draw the 2D structure and get the formula, masses, rings, H-bond donors and acceptors, rotatable bonds, TPSA, cLogP and the Lipinski and Veber rules — plus, with RDKit in WebAssembly, canonical SMILES, InChI/InChIKey, exact descriptors, SMARTS substructure search and fingerprint similarity. Load a protein from the Protein Data Bank by ID (1A3N haemoglobin, 4INS insulin) in 3-D and export it as an STL for printing.

Added · updated 14 October 2026

How to use it

Input. The box takes three kinds of input, tried in this order:

  • SMILES — whenever the text parses as SMILES it is read as one, so CO is methanol and NO hydroxylamine. When the same text is also the formula of something in the library (CO, carbon monoxide; NO, nitric oxide) a note under the box offers it.

  • A molecular formula — C20H25N3O, C₂₀H₂₅N₃O with Unicode subscripts, hydrates (CuSO4·5H2O) and charges (SO4^2-, SO₄²⁻). A formula lists the atoms but not how they are joined, so it cannot be drawn: the page shows its average and monoisotopic mass and the library molecules that have it (C₂₀H₂₅N₃O → LSD), and offers a PubChem search for every known compound with that formula.

  • A name — matched against the library’s names and synonyms, ignoring case, spaces, hyphens and Greek letters (lsd, caffeine, vitamin c, beta-alanine). An exact match opens the molecule; a partial one lists suggestions. Names the library does not know can be looked up on PubChem.

PubChem. Searches go to PubChem's PUG REST service (NCBI) — and only when you press a Search PubChem button; nothing you type is sent otherwise. Results (up to 20) open in the viewer with a click.

SMILES syntax. Standard SMILES: the organic subset (B C N O P S F Cl Br I) with implicit hydrogens, aromatic lower-case atoms (c1ccccc1) or Kekulé rings (C1=CC=CC=C1), bracket atoms with isotopes, hydrogens and charges ([13CH4], [NH4+], [O-]), branches, ring closures (including %10), stereo marks (@, @@, /, \), and . between the ions of a salt. Anything after a space is used as the molecule’s name. Errors point at the character that broke the parse.

Drawing. Structures are laid out by smiles-drawer 2.4.1, loaded from jsdelivr the first time you open the page; the colours follow your light or dark theme. Export the drawing as SVG or as a 1280 × 960 PNG.

Properties. Everything else is computed here from the parsed graph:

  • Formula and mass — Hill order; average masses from the chemistry tool's IUPAC table, monoisotopic mass from the most abundant isotopes (less the electron mass for ions).

  • Rings — the ring count is the cyclomatic number (bonds − atoms + fragments); aromatic rings come from the input’s lower-case atoms or Hückel 4n + 2 perception of Kekulé rings.

  • H-bond donors / acceptors — Lipinski’s counts: hydrogens on N and O, and the number of N and O atoms.

  • Rotatable bonds — acyclic single bonds between two non-terminal heavy atoms, excluding bonds to triple-bonded atoms and amide C–N bonds (the "strict" definition PubChem and RDKit use).

  • TPSA — topological polar surface area from Ertl, Rohde & Selzer (J. Med. Chem. 2000, 43, 3714) N and O fragment contributions; matches RDKit for the library except water (Ertl has no type for it).

  • cLogP — the Wildman–Crippen atom-contribution method (J. Chem. Inf. Comput. Sci. 1999, 39, 868). It reproduces RDKit’s MolLogP to within 0.3 for about 92% of the library but drifts on sulfoxides and sulfonamides (DMSO, omeprazole, sildenafil), salts, metal complexes and charged dyes — load RDKit for the exact figure. Crippen is typically within ±0.7 of measured log P and knows nothing about ionisation.

  • Rule of five — molar mass ≤ 500, cLogP ≤ 5, ≤ 5 donors, ≤ 10 acceptors; more than one violation suggests poor oral absorption. Veber’s rules add ≤ 10 rotatable bonds and TPSA ≤ 140 Ų. They are rules of thumb: many antibiotics, natural products and biologics break them and work fine.

Batch takes one SMILES per line (optionally followed by a name) and tabulates the properties; download the table as CSV.

Library has about 630 molecules in 24 categories, each with synonyms and a one-line description: neurotransmitters and hormones, all the amino acids, nucleotides and cofactors, sugars, lipids, vitamins, metabolites; drugs for pain, infection, viruses, the heart, the brain, cancer, anaesthesia, allergy and the gut; alkaloids and psychoactive compounds; natural toxins; solvents and lab reagents; industrial chemicals and monomers; polymer repeat units (drawn with * ends); dyes and indicators; flavours and fragrances; pesticides; and a few celebrities (buckminsterfullerene, cubane, penguinone, olympicene). Search it by name, synonym, formula or description, or filter by category. Structures and formulas come from PubChem — each entry links to its compound page — and every SMILES is checked against both this page’s parser and RDKit when the library is built (scripts/gen-molecule-library.js).

⛶ Full screen (or F) gives the structure drawing (Viewer) or the 3-D protein (Protein) the whole screen — the browser’s full screen where it is allowed, otherwise a full-window layer (iPhone); ◫ Panels hides the properties column. Escape leaves.

RDKit (optional)

RDKit, the standard open-source cheminformatics toolkit (BSD-3-Clause), compiled to WebAssembly (@rdkit/rdkit 2026.09.1, about 2.4 MB from jsDelivr), adds three things. It loads only when you press Load RDKit, and is then loaded automatically on later visits; it runs entirely in your browser.

  • Viewer — canonical SMILES, InChI and InChIKey, a MOL file download, and RDKit’s own descriptors (mass, exact mass, Crippen cLogP, TPSA, Lipinski and strict H-bond counts, rotatable bonds, rings, Fsp³, stereocentres) beside this page’s estimates, each marked same or differs. Draw with RDKit swaps the depiction to RDKit’s, with stereo labels.

  • Substructure — a SMARTS pattern (or plain SMILES) searched across the library and any molecules you add, with the matching atoms highlighted. Seventeen common patterns are in the menu: acids, esters, amides, amines, phenols, halogens, nitro groups, sulfonamides, chiral centres and more.

  • Similarity — Morgan (ECFP-style) fingerprints with a choice of radius and length; the Tanimoto similarity between two molecules, and the library ranked against a query. Aspirin and salicylic acid score about 0.45 at radius 2.

Protein structures (PDB)

The Protein (PDB) tab supports the "Make a molecule" exercise in chapter 3, Chemistry and molecules of Human Biology for the Medical Maker — download a structure from the Protein Data Bank, haemoglobin (1A3N) or insulin (4INS), make a physical model of it, and write its limitations statement — and the molecular teaching models in its device index (appendix I).

  • Load — type a four-character PDB ID (a digit 1–9 then three letters or digits; anything else is refused) and press Load from RCSB. The coordinate file comes from RCSB PDB (files.rcsb.org) only when you press the button or open a link with ?pdb=; very large entries that have no PDB-format file are fetched as mmCIF. Open .pdb / .cif… reads a file of your own in the browser without uploading it. Only the first model (NMR entries) and the first alternate location of each atom are used.

  • Summary — method, resolution, chains with residue counts, ligands (HEM ×4 in haemoglobin, ZN ×2 in 4INS insulin), waters, and the one-letter sequence of each chain’s modelled residues.

  • 3-D view — 3Dmol.js 2.5.5 (BSD-3-Clause), loaded from cdnjs the first time you load a structure: cartoon, backbone trace, sticks, space-filling, or cartoon with a translucent surface; coloured by chain, N → C terminus, or element. Print model shows exactly the mesh the STL will contain.

  • Print it (STL) — the mesh is built on this page from the atom coordinates, not taken from the viewer: either a smooth closed tube through the Cα atoms (P atoms for DNA and RNA), split where the chain has a gap, or every heavy atom as a faceted sphere of its Bondi van der Waals radius (overlapping spheres; slicers merge them). Ligands can be added as spheres — in the tube model they are separate pieces unless they touch it. The scale is millimetres per ångström (1 mm/Å makes haemoglobin about 65 mm across); the STL is binary, in millimetres, sitting on z = 0. Out-of-range settings are refused, not clamped.

  • Limitations statement — written from the file and your print settings, as the book asks: the method and resolution, what is shown, what is omitted (waters, hydrogens, side chains in the tube, unresolved residues), the geometry and scale, and that the colours on screen mean chain or position, not chemistry. Edit it to match what you actually make.

Limits

The coordinates are a model fitted to experimental data; the tube is not a ribbon diagram (no helix or sheet shapes), and the space-filling model is a union of spheres, not a computed molecular surface. A fine space-filling haemoglobin is over 70 MB of STL — use medium detail. Check overhangs, wall thickness and floating ligand pieces in your slicer.

Related: sequence tool for the chains' sequences, STL viewer to check the exported file.

Sharing

Share link (top right) copies a URL for the molecule on screen — and, on the Substructure and Similarity tabs, the SMARTS pattern or the two molecules being compared. The parameters are plain, so links are easy to write by hand: ?smiles= and an optional &name= (URL-encode #, + and = as %23, %2B and %3D), for example /tools/molecule/?smiles=CN1C=NC2=C1C(=O)N(C(=O)N2C)C&name=caffeine; ?q= for anything the box accepts — a name or a formula, as in ?q=lsd or ?q=C20H25N3O; ?smarts=…#substructure; ?a=…&b=…#similarity; and ?pdb= for a protein, as in ?pdb=4INS#protein.

For sequences use the sequence tool; for solution maths with these molar masses use solutions.

Runs entirely in your browser — network requests go only to the services named on this page.