# TikZ chemistry examples

> Chemistry and materials figures in TikZ, with code: a ball-and-stick molecule, Wyckoff positions, a convex hull, a Sabatier volcano plot and DFT workflows.

URL: https://www.labcanvas.com/tikz/examples/chemistry

Six figures from Janosh Riebesell’s *diagrams* collection, on molecules and computational materials science: a ball-and-stick organic molecule, Wyckoff positions, a convex hull of stability, a Sabatier principle volcano plot, the Kohn–Sham self-consistency cycle and the choices made in a DFT calculation. The Kohn–Sham cycle and the DFT choices are boxes and arrows placed with the `positioning` library, the molecule’s atoms are shaded spheres (`ball color`), and the convex hull and the volcano plot are drawn on plain TikZ axes rather than with pgfplots.

For skeletal formulas and reaction schemes the usual tool is the chemfig package, which draws molecules with TikZ; the TikZ editor has chemfig loaded.

## Molecules & structures

- **Ball-and-stick organic molecule** (Molecules & structures): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/organic-molecule/organic-molecule.tex. Code: https://www.labcanvas.com/tikz-library/code/ball-and-stick-organic-molecule.tex
- **Wyckoff positions** (Molecules & structures): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/wyckoff-positions/wyckoff-positions.tex. Code: https://www.labcanvas.com/tikz-library/code/wyckoff-positions.tex

## Electronic structure & catalysis

- **Convex hull of stability** (Electronic structure & catalysis): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/convex-hull-of-stability/convex-hull-of-stability.tex. Code: https://www.labcanvas.com/tikz-library/code/convex-hull-of-stability.tex
- **Kohn–Sham self-consistency cycle** (Electronic structure & catalysis): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/kohn-sham-cycle/kohn-sham-cycle.tex. Code: https://www.labcanvas.com/tikz-library/code/kohn-sham-self-consistency-cycle.tex
- **Sabatier principle (volcano plot)** (Electronic structure & catalysis): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/sabatier-principle/sabatier-principle.tex. Code: https://www.labcanvas.com/tikz-library/code/sabatier-principle-volcano-plot.tex
- **Choices in a DFT calculation** (Electronic structure & catalysis): MIT licence, © Janosh Riebesell and contributors. Source: https://github.com/janosh/diagrams/blob/7a79b3114e201fad9b6785e936eab859d1bc8c12/assets/dft-choices/dft-choices.tex. Code: https://www.labcanvas.com/tikz-library/code/choices-in-a-dft-calculation.tex

## Using these figures

Every figure keeps its own licence: MIT or CC0 1.0, both of which allow use, change and sharing, commercial use included. The MIT licence asks that its copyright and permission notice go with copies of the code, so each figure’s code starts with its source, author and licence; keep those lines when you reuse it. The full licence texts are on the [sources and licences page](https://www.labcanvas.com/tikz-library/credits.html).

“Open in the TikZ editor” loads the figure’s complete document into the free TikZ editor, where it is typeset with TeX Live 2026 and you can change it and download a PNG. To compile it on your own computer, save the code as a.tex file and run pdfLaTeX (or the engine the tile names) on it; LabCanvas changed the files only where needed to make each one compile on its own, as its first lines say.

Licence texts: https://www.labcanvas.com/tikz-library/credits.html
