KherveMol
Coming soonDraw chemical compounds and crystal structures in 2D and 3D.
A native molecular builder and viewer: an interactive 3D ball-and-stick model alongside a flat 2D skeletal sketcher over one shared structure. Build molecules by hand respecting each element's valence, browse 300+ named compounds and crystal unit cells, and export SVG straight into KhervePaint — with no heavy chemistry dependencies required.


Attributes
- 3D ball-and-stick viewer — lit CPK spheres and single/double/triple bonds, depth-sorted; drag to orbit, wheel to zoom, view cube to snap to any face
- Build molecules by hand — the builder respects each element's valence and refuses to over-bond; drag an atom to bend a bond
- 2D skeletal sketcher kept in sync with the 3D model; Build 3D from 2D sketch (Ctrl+B) and back again
- 30+ built-in structures and crystal unit cells (simple cubic, BCC, FCC, HCP, diamond, NaCl, CsCl)
- Molecule Explorer with 300+ named compounds — drugs, amino acids, sugars, terpenes, steroids, monomers, and whole homologous series
- Full 118-element periodic table as a dockable, CPK-coloured picker
- Export SVG that opens in KhervePaint as editable, gradient-filled vectors
- Properties — formula and molecular weight; with RDKit, exact mass, LogP, TPSA, H-bond donors/acceptors, rings, and InChI / InChIKey
- Pure-Python isometric 3D — no OpenGL, runs with just PyQt5 and qtawesome
- .kmol save/open and PNG export
AI built in
A built-in AI Chat answers chemistry questions and draws on request — say “draw caffeine” and the assistant renders the molecule. Works with Claude, ChatGPT, Mistral, Ollama, or a local server, all off the UI thread.
Built with
A modern stack of well-known scientific Python libraries.
Examples
- Small molecules — water, ammonia, methane, formaldehyde
- Alcohols & acids — methanol, ethanol, acetic acid, glucose
- Hydrocarbons — ethane through benzene and cyclohexane
- Crystal unit cells — BCC, FCC, HCP, diamond, NaCl, CsCl
- 300+ named compounds — drugs, amino acids, sugars, nucleobases
Documentation
Getting started
Install the requirements and run python KherveMol.py (or python -m khervemol). Pick a structure from the Molecule or Crystal menu, or from the library tree on the left, and it opens in the 3D view.
Building molecules
In 3D View, drag to rotate, use the wheel to zoom, and the view cube to snap to standard orientations. To build, click an atom (a green ring appears), choose a bond order, then click an element in the Add atom palette; press Delete to remove an atom.
2D and 3D together
The 2D sketcher draws proper skeletal formulae — line bonds, lettered heteroatoms, implicit hydrogens — and stays mirrored with the 3D model. Build 3D from 2D sketch (Ctrl+B) goes one way; Structure ▸ Flatten 3D → 2D sketch goes the other.
Import, export, and files
With RDKit installed you can type a SMILES string to embed a real 3D conformer, or open .mol / .sdf / .pdb files. Native documents save as .kmol; export a PNG of the current tab, or SVG that opens editable in KhervePaint.
Part of the Kherve Tools family
Applications made by a scientist, for scientists.