Molkit

Chemistry drawings for teaching, research, and the web

Molkit is a chemistry drawing program that runs in your browser. Draw Lewis structures, animate mechanisms, and export figures at the size a journal prints them.

Under active development

Hydroxide attacks bromomethane from the back side. The three hydrogens invert and bromide leaves. An introduction to Molkit, recorded in the app.

Draw a structure by hand

Pick a tool from the palette on the left, place a ring with one click, and drag bonds out of atoms. To change an atom, rest the pointer on it and type the element symbol, or choose an element from the picker on the right and click the atom. Click a bond to change its order.

While you drag a bond out, a guide shows the angles it snaps to.

Your first molecule

Benzaldehyde, drawn with the Ring and Bond tools; the O is typed with the pointer on the atom.

Draw a structure with a script

Many drawing actions have a Molkit Script command. A figure kept as a script can be sent to a colleague, changed, and run again.

Record in the script console writes the commands while you draw with the mouse, so a drawing made by hand can be saved as a script and played back.

draw benzaldehyde smiles: "O=Cc1ccccc1" view: bondline

Molkit Script

One line draws the benzaldehyde from the row above, from its SMILES.

Type what you want to do

Type a few letters of a command, a setting, a preset, or a molecule's name in the command palette. Start the line with > to run it as Molkit Script. The entries you used last come first.

Six requests from the palette: acetate by name, a Script line for its resonance forms, its IR spectrum, the 3D view, the ACS 1996 style, and an SVG export. Sped up while the spectrum computes.

The command palette

Tell Molkit what you want

Ask in the AI chat for what you would otherwise do by hand: draw a set of molecules, animate a mechanism, compute an ESP map or a reaction path, switch to a journal's style, or export the figures. You can also attach a picture or a page of a PDF and ask for its structures. The AI writes a Molkit Script, checks it, and runs it, so everything it does is a script you can read, keep, and change.

The chat uses your own key from Anthropic, OpenAI, Google, OpenRouter, or Z.ai. Your browser sends the key straight to that provider. Z.ai does not accept requests from a web page, so molkit.com passes those on to Z.ai, without storing the key.

The AI chat

"Draw acetic acid and water in equilibrium with acetate and hydronium." Sped up while the AI works.

From coordinates to a Lewis structure

Paste the coordinates from a calculation or a model, the lines of an .xyz file, into File > Import XYZ. Molkit works out which atoms are bonded and with what bond orders, and lays the molecule out flat as a drawing you can edit.

An ion's charged atom gets its charge, such as N+ in ammonium. Lone pairs and stereo wedges are options.

Import XYZ coordinates

38 porphine C -0.765 0.000 -6.062 N -0.765 0.769 -4.895 C -0.765 2.128 -5.218 C -0.765 -3.763 -5.183 C -0.765 -4.266 -3.915 C -0.765 -3.095 -2.987 N -0.765 -1.925 -3.720 C -0.765 -2.275 -5.057 C -0.765 3.763 -0.731 C -0.765 4.266 -1.999 C -0.765 3.095 -2.927 N -0.765 1.925 -2.194 C -0.765 2.275 -0.857 C -0.765 -2.220 0.762 C -0.765 -0.932 1.273 C -0.765 0.000 0.148 N -0.765 -0.769 -1.019 C -0.765 -2.128 -0.696 C -0.765 2.220 -6.676 C -0.765 0.932 -7.187 C -0.765 -1.394 -6.142 C -0.765 1.394 0.228 C -0.765 -3.198 -1.593 C -0.765 3.198 -4.321 H -0.765 0.404 -3.975 H -0.765 -4.286 -6.134 H -0.765 -5.299 -3.580 H -0.765 4.286 0.220 H -0.765 5.299 -2.334 H -0.765 -3.159 1.307 H -0.765 -0.621 2.313 H -0.765 -0.404 -1.939 H -0.765 3.159 -7.221 H -0.765 0.621 -8.227 H -0.765 -1.835 -7.152 H -0.765 1.835 1.238 H -0.765 -4.211 -1.160 H -0.765 4.211 -4.754
Porphine: the coordinates of 38 atoms in, a Lewis structure out.

Tidy a rough drawing in one step

Structure > Clean Up Structure sets the bond lengths and angles to standard values and redraws each separate ring of three to eight atoms as a regular polygon. It moves atoms, but it does not add, remove, or relabel any.

Drag across the picture to compare ibuprofen before and after.

What Clean Up Structure moves

Drawn the way IUPAC recommends

Molkit follows the IUPAC recommendations for chemical structure drawings, including the less familiar rules. Each drawing rule below gives its section number.

  • A double bond shared by two rings has its second line in the ring with more double bonds (GR-1.10.4).

  • A C=O at a corner has its second line inside the bend, as in an aldehyde; one between two groups is centered, as in a ketone (GR-1.10.2).

  • A ring-fusion stereocenter gets an explicit H on a wedge or hash, pointing out of the rings (ST-1.3.2).

  • Atom numbers follow the 2013 IUPAC numbering of the parent chain.

How Molkit draws a structure

Journal styles at their printed size

Each journal preset sets the bond length, line width, and label size the journal asks for. Export at 100% and the figure comes out at the size it prints. The same aspirin in three styles:

ACS 1996
RSC
Nature

All the presets

Change how each part is drawn

Molkit follows the drawing conventions by default, and you can change them. Each numbered part has settings of its own. Set them for the whole document in Structure Settings, or for one atom or bond in the Properties panel. Molkit Script sets both.

  1. Bond width and line ends
  2. Double bond spacing, and the side its second line takes
  3. Wedge width, at the wide end and the narrow end
  4. Hashed bonds: how many lines, and their spacing
  5. Labels: font, size, weight, and the space around them
  6. Charge sign: plain or circled, its size, place, and color
  7. Lone pairs: dots, lines, or lobes, their size, spacing, distance, and color
  8. The side of the atom its H is written on
  9. Element colors, or one atom's or bond's own color
  10. Stereo labels: shown or hidden, size, color, and place
  11. Benzene rings: alternating double bonds or a circle, and the circle's size, color, and dash

Also: bond length, carbon labels, radicals, atom numbers, wavy and bold bonds, and the gap where one bond crosses another.

Alanine, set up for four jobs:

Journal (ACS 1996)
Intro textbook
Lecture slide
Lone pairs as lines, as in many European textbooks

Structure settings

Animate a mechanism from its steps

Draw each step of the mechanism with its curved arrows. Molkit animates from one step to the next: the electrons follow the arrows, bonds form and break, and the atoms move into place. The animation exports as one SVG file that plays in any web browser, on a website, or in a web slide deck; for PowerPoint, export a video.

Acetal formation from 5-hydroxypentanal and methanol in acid: the overall reaction, then each step with its proton transfers. One SVG file, 48 seconds.

Animate a reaction

Worked solutions, one line at a time

Write a derivation in LaTeX as an align* block, and Molkit turns it into a step-by-step animation: each line appears in turn and the numbers go in as the solution proceeds. A bar over a digit marks its last significant figure.

The export is one SVG file with a caption for every step, and a spoken version of each caption for screen readers. This one is from the calorimetry chapter of chem.academy.

Animate a LaTeX solution

The heat of reaction from a calorimetry run, solved line by line.

Practice problems that check the drawing

A web page, such as a class website or an online textbook, can show a drawing problem. The student draws the structure and presses Check, and Molkit says what is missing, such as a lone pair or a charge. The answer is checked on the server, so it is not in the page.

Try one: choose a molecule, draw it, and press Check.

One file holds every view of a molecule

An SVG exported from Molkit is self-contained: inside the one file are the Lewis, VSEPR, and bond-line views, the 3D model, and computed results such as the IR spectrum. It needs no database or server. Opened anywhere else, it is an ordinary picture. An ESP map is inside it too, unless you choose to save the map as a separate file.

On a web page with the Molkit Viewer, the same file opens all of it: readers switch views, turn the 3D model, and show each atom's formal charge, oxidation state, hybridization, or electronegativity. The viewer here is live.

Put the Molkit Viewer on a page

One file, formaldehyde.svg, in the Molkit Viewer. Choose a view at the top.

Figures that carry their chemistry

Each atom and bond in an exported SVG carries what it is: element, charge, oxidation state, hybridization, lone pairs, bond order, and bond polarity. The file also holds the SMILES and InChI.

A web page can restyle the figure by its chemistry. One CSS rule highlights every sp2 atom or every charged atom, and one call to the Molkit Viewer labels every atom with its formal charge, oxidation state, hybridization, or geometry, or draws each bond's dipole arrow. The figure here is glycine as its zwitterion; each switch adds one rule or one label.

The SVG format for developers

Highlight
Label
Show
/* choose a switch above */

Orbitals in 3D

The 3D view can show a molecule's hybrid orbitals in place of the ball-and-stick model. Ethane, ethene, and acetylene show the series: sp3, sp2, and sp carbons, with no, one, and two π bonds.

The MOs button on the bar under the model shows the molecular orbitals instead, from a GFN2-xTB calculation saved with the figure, beside a ladder of their energies: click a level to see that orbital. Where there is a π bond, the bar's slider moves the p orbitals together into it, and Explore builds the hybrids up from the atomic orbitals.

Orbitals in the Molkit Viewer

Ethane: four sp3 hybrids on each carbon, every bond a σ bond. Drag to turn the model.

Electrostatic potential on the molecule

An ESP map colors the molecule's surface by its electrostatic potential: red where the molecule is electron-rich, blue where it is electron-poor. The map is saved in the exported SVG, and readers can turn it in the Molkit Viewer.

The maps here were calculated ahead of time. Calculating your own needs the calculation helper; a map from a cube file opens without it.

Electrostatic potential maps

Each map uses its own molecule's range.

Calculations on the drawing

Molkit computes a molecule's IR spectrum and its vibrations, energy scans, and, for a simple mechanism such as one SN2 step, the energy along its reaction path. A reaction path or an IR spectrum is saved with the drawing and in the exported SVG; a scan is saved when you insert its chart into the drawing.

IR spectra and reaction paths use GFN2-xTB, and most angle and dihedral scans use the MMFF94 force field, both in the browser (gas phase). A scan that stretches a bond or turns an angle in a ring, a calculation in a solvent, or a GFN2-xTB scan needs the calculation helper, a program that runs xTB on your own computer.

A chart of energy along the reaction coordinate, from the reactant complex at −14.4 kcal per mol through the transition state at −8.0 to the product complex at −17.1.
The SN2 reaction of chloride with bromomethane, computed from its animated mechanism with Compute > Reaction Mechanism: the energy from the reactants through the transition state to the products. Along the x axis, the reaction coordinate from the reactants to the products; below, the three structures from the computed path.

Computed results

Crystals and unit cells

Open a CIF, POSCAR, or extended XYZ file as a unit cell you can edit, or pick one of the built-in crystals. Every atom of the cell is an ordinary atom you can select, move, and style.

The crystal panel repeats the cell, looks along an axis, counts the atoms in the cell, marks holes, stacking layers, and (hkl) planes, draws polyhedra, opens the cell in 3D, and computes the powder pattern.

Crystals and unit cells

Rock salt in 3D: ball-and-stick ions tinted by their place in the cell, the chloride ions larger than the sodium ions, and a key under it: corner, edge, face, inside.
Rock salt in 3D with Count atoms on: each ion tinted by where it sits in the cell.

In use in an open textbook

chem.academy, an open-access general chemistry textbook, is illustrated in Molkit: 186 structure figures that open in the Molkit Viewer, 16 mechanism animations, and 378 animated worked solutions.

More in Molkit

  • Template library

    More than 700 ready-made structures, from small molecules to protecting groups and chair projections. Search by name, abbreviation, or formula.

  • Abbreviations

    Place Ph, Boc, OTs, and other groups as labels, expand a label into its structure, or collapse a drawn group into its label.

  • R groups

    Placeholder atoms such as R, X, and Nu, each with the list of substituents it stands for.

  • SMILES

    Turn a SMILES string into a drawing, or copy a drawing out as SMILES.

  • MOL and SDF files

    Open a structure from another program as a drawing you can edit.

  • PubChem names

    Select a molecule and Molkit looks up its name in PubChem and shows it in the status bar, ready to copy.

  • The chemistry in the file

    An exported SVG can carry the molecule's name, InChI, and InChIKey, which other programs can read.

  • Your own style

    Save your own structure preset and color scheme, and share both as one .mkstyle file. A theme-aware SVG export follows the reader's light or dark setting, or takes its colors from the page's CSS.

  • Projections

    Newman, chair, Fischer, and Haworth projections. Turn a Newman projection's back carbon to compare conformations.

  • Perspective drawing

    Redraw a cage or bridged ring, such as adamantane, cubane, or camphor, as its 3D shape in a textbook view.

  • Resonance forms

    Molkit draws the resonance forms of a structure, including the minor forms and the octet forms.

  • Net dipole

    An arrow over the structure toward the molecule's negative end, estimated from its 3D shape, as textbooks draw it.

  • Hybridization figures

    Orbital box diagrams of an atom's hybridization, and the hybrid orbitals on xyz axes.

  • MO diagrams

    Diatomic molecules and ions, and the Hückel π levels of conjugated hydrocarbons.

  • Electron configurations

    An atom or a monatomic ion as orbital boxes on an energy ladder, in a line, or as notation.

  • NMR signals

    The 1H and 13C signals of a drawn molecule: equivalent atoms, integration, splitting, and DEPT.

Read the documentation

Each feature has a page with its menu path and what each option does. The documentation also has the Molkit Script reference and a cookbook of scripts with their pictures.

docs.molkit.com