Draw the structural formula of a compound, or write out a reaction, directly in the browser.
JSME
Draw a structural formula, a reaction or a single molecule. Nothing on this page is saved anywhere, so export the result in one of the formats offered: SMILES, MOL, SVG and others.
To find out what a compound is called from its formula: draw the structure, press the button with the triangles in the second row and choose «Search chemical structure (through InChIKey)».
PubChem
The editor of the United States National Center for Biotechnology Information. The interface is dated, but it exports to a great many formats.
How to use the structural formula editor
The JSME editor above is a small drawing program for molecules. Its buttons have no captions, so this guide names them by what they show: tools in the two top rows, elements in the left column, the canvas in the middle.
Drawing a structure
- The first bond. The button with one straight line in the second row is the single bond. Select it and drag a short line across the empty canvas: you get two carbon atoms joined by a bond. Carbons are not labelled: every corner and line end is a carbon.
- Growing the chain. With the single bond selected, click an atom and a new bond grows out of it. The wavy-line button draws a whole zigzag chain if you drag it across the canvas.
- Double and triple bonds. Click an existing bond with the single-bond tool and it becomes double; click again and it is single once more. For a triple bond, select the button with three lines and click the bond.
- Rings. The triangle, square, pentagon, hexagon, heptagon and octagon place rings of three to eight atoms; the hexagon with double bonds drawn inside is benzene. Click the empty canvas to place a ring, an atom to attach a new ring to it by a bond, or a bond to fuse a second ring on, as in naphthalene.
- Other elements. Choose an element in the left column (C, N, O, S, F, Cl, Br, I, P) and click an atom: it changes to that element. For anything else press X, type the symbol in the Nonstandard atom window (Si, Na and so on), close it and click the atom.
- Ready groups. FG opens a list of common groups: -C(=O)OH, -NO2, -C#N, -NMe2 and others. Pick one and click the atom it should be attached to.
- Charges. Select +/− and click an atom. Each further click changes the charge, so click until the label shows what you need, such as NH₃⁺ or O⁻.
- Deleting. With the red cross, click an atom to remove it with its bonds, or a bond to remove just the bond. The crossed-out R removes a whole substituent when you click the bond that holds it. The empty white square clears the canvas.
- Undo and redo are the two curved arrows in the top row.
- A second molecule. To draw another molecule beside the first rather than attached to it, press NEW first.
Example: ethanol, C₂H₅OH
- Select the single bond and drag a short line on the canvas.
- Click the right-hand atom once: the chain is now three atoms long.
- Choose O in the left column and click the last atom. It turns into OH.
That is ethanol; the editor adds the hydrogen to oxygen by itself. Press the smiley face in the top left corner and a small window shows the SMILES: CCO.
Example: benzene and aspirin
- Select the benzene button and click the canvas. That is benzene, C₆H₆.
- Press FG, choose -C(=O)OH and click a ring atom: benzoic acid.
- Press FG again, choose -OC(=O)Me and click the neighbouring ring atom.
The result is aspirin, acetylsalicylic acid: CC(=O)Oc1ccccc1C(=O)O. A plain hexagon with three alternating double bonds gives the same thing: the editor recognises the ring as aromatic.
Writing a reaction
A reaction is drawn molecule by molecule around an arrow. Esterification of acetic acid with ethanol:
- Draw acetic acid as an ordinary structure.
- Press NEW, then draw ethanol below or beside it.
- Press the straight arrow in the top row, between +/− and the curved arrows. The reaction arrow appears in the middle of the canvas.
- Press NEW and draw ethyl acetate to the right of the arrow; press NEW again and draw water.
What stands to the left of the arrow is read as starting materials, what stands to the right as products. Every molecule after the first begins with NEW; without it the editor will not start a separate structure.
A reaction can also be typed as text: starting materials, two greater-than signs, products, molecules separated by dots. The same esterification:
CC(=O)O.OCC>>CC(=O)OCC.O
- Press the blue triangles at the end of the second row.
- Choose Paste MOL or SDF or SMILES.
- Paste or type the line and press Accept.
The editor draws acetic acid and ethanol, an arrow, then ethyl acetate and water; their atoms and bonds can be edited as usual. Write both sides: a line with nothing after >> ends in an error.
Finding the name of a compound from its structure
Draw the structure, press the blue triangles and choose Search chemical structure (through InChIKey). A new tab opens with a web search for the InChIKey, a code calculated from the structure; the results usually lead to the compound's page in PubChem or an encyclopaedia, with its names. To search PubChem directly, choose Copy as InChI key or Copy as SMILES and paste the text into PubChem's search box.
Saving the result
Nothing is stored on this page: leave or reload it and the drawing is gone. Before that, take what you need from the blue-triangle menu:
- Copy as SMILES: one line of text, the easiest way to keep a structure in notes or send it to someone. Pasting it back through Paste MOL or SDF or SMILES restores the drawing.
- Copy as MOL and Copy as MOL V3000: atom coordinates that other chemistry programs open; Copy as InChI and Copy as InChI key give standard database identifiers.
- Copy as Scalar Vector Graphics: the picture as SVG code. Paste it into a text editor and save it with the .svg extension for an image that stays sharp at any size.
Each Copy item opens a window with the text already selected: press Ctrl+C (Cmd+C on a Mac). The Paste window also accepts a MOL file dropped onto it.
Tips and common mistakes
- Do not draw hydrogens on carbon. They are implied: each carbon gets as many as it needs for four bonds. On nitrogen, oxygen and sulfur the editor writes them itself (OH, NH2).
- Charges are part of the compound. An ion drawn without its charge is a different substance, and the search will find the wrong one.
- Count the bonds. Five bonds on a carbon or three on a neutral oxygen mean a bond was made double by mistake; undo it.
- Check by SMILES. The smiley face shows the SMILES of the canvas, a quick way to see that the editor read the drawing as you meant it. For the molar mass, use the molar mass calculator; the elements themselves are described on the pages for carbon, oxygen and nitrogen.