The ChemFox guide beta
Everything ChemFox does, and every key. On a Mac, read ⌘ wherever it says Ctrl.
The basics: hover and type
Most edits in ChemFox don't need a tool. Point at something and press a key: what the key does depends on what's under the cursor. Point at an atom and press N to make it nitrogen; point at a bond and press 2 to make it double; point at empty canvas and press R to drop a benzene ring there.
The thing a key will act on is highlighted as you move. When several things overlap (an atom label over a bond, say), Tab cycles between them.
The toolbar on the left has the tools for everything else: Select (V), Chain (G), Arrow (Shift+A), Bent arrow (Shift+B), Text (Shift+T) and Map (Ctrl+M). With Select, dragging on empty canvas draws a selection box.
Drawing structures
Atoms and bonds
- Elements: C N O S P F H, L for Cl, B for Br, I for I. On an atom they change it; on empty canvas they add one.
- New bonds: 1, 2 or 3 on an atom grows a single, double or triple bond in a sensible direction, leaning toward the mouse. You can also drag from an atom to draw a bond, or onto another atom to join them.
- Bond order: 1 2 3 on a bond.
- Stereo: W wedge, H hash, Y wavy. Pressing the same key again flips which end is narrow. F flips a wedge, or moves a double bond's second line to the other side.
- Charges and radicals: + (or =) and - change the charge; . toggles a radical.
Chains and rings
- Chains: pick the Chain tool (G) and drag; the zig-zag follows the mouse. Or build one bond at a time from the keyboard with the focused atom.
- Rings: Shift+3 to Shift+8 add a 3- to 8-membered ring, R a benzene. On a bond they fuse the ring onto it. On a chain end the atom becomes part of the ring; on an atom that already has two bonds the ring hangs off a new bond instead (a saturated ring on a two-bond atom is drawn spiro).
Tidying up
- Ctrl+L cleans up a structure with RDKit, keeping E/Z and R/S. Press it again to cycle through other tidy orientations.
- Structure → Transform flips and rotates; right-click a structure for the same and more.
- Warnings (valence, overlaps, unbalanced brackets…) appear in the Warnings panel; each can be silenced for one item, one document or everywhere.
The focused atom
When a key grows a bond, the new atom becomes the focused atom, marked in light orange. From then on every key acts on it, wherever the mouse is, so you can build a whole chain without aiming:
- Hover an atom and press 1. The new atom turns orange.
- Keep pressing 1 to extend the chain. Move the mouse to steer: each new bond leans toward the pointer. Leave the mouse still and the chain carries on in a straight zig-zag.
- Press any other key on the focused atom: O for oxygen, 2 for a double bond onward, Shift+C for an acetyl, R for a phenyl.
- Use the arrow keys to move the focus to a neighbouring atom along a bond.
- Press Esc or click to finish.
To focus an atom of an existing structure, click the structure to select it, then click the atom.
Labels and groups
- Labels: Enter on an atom lets you type a label: OMe, CO2Et, NHBoc, CoA and many more. Labels count toward the formula, flip to read correctly from either side (CO₂Et / EtO₂C), and get their subscripts automatically.
- Groups by key: Shift+C adds an acetyl (Ac). Like rings, a group replaces a chain end, or hangs off a new bond from an atom that already has two bonds.
- Expand and collapse: E on a label draws it out as atoms; E on any atom of the drawn-out group collapses it back. Right-click for the same, or Structure → Show Labels as Structures for all of them.
- Your own groups: Edit → Keyboard Shortcuts → Groups. Give a name (say
Tr) and a SMILES with one*where it attaches (*C(c1ccccc1)(c1ccccc1)c1ccccc1), and optionally press a key for it. Custom groups work like the built-in ones, and documents that use them carry the definition, so they open correctly on other computers.
Selecting and moving
- Click a structure, arrow or text to select it; Shift+click adds to the selection; Alt+click selects a single atom.
- Drag a selection box on empty canvas; Ctrl+A selects everything.
- Drag a bond to move its structure, or Ctrl+drag anything to move it.
- Arrow keys nudge the selection (Shift for bigger steps). With a focused atom they move the focus instead.
- Delete or Backspace deletes what's under the cursor, or the selection.
Reactions and schemes
Continue Reaction
Select a structure and press Ctrl+→ (or ↓ ← ↑). ChemFox draws an arrow in that direction and a copy of the structure past its head, selected and ready to edit into the product. The copy is mapped atom for atom to the original and the step shows bond changes, so what you break and form is coloured as you edit. Press it again to carry on from the copy.
Arrows
- Draw arrows with the Arrow tool, or press A on empty canvas. Bent arrows: the Bent tool, click each corner, Enter to finish.
- Enter on an arrow edits its conditions (above and below); formulas like H2SO4 get subscripts, and
**bold**/*italic*work. - K cycles the arrow kind: forward, equilibrium, retrosynthetic, resonance and more. Right-click for colour, head and line styles.
- Drag an arrow's ends to re-anchor them; drag a bent arrow's corners and segments to reshape it.
Laying out a scheme
- Ctrl+Shift+A arranges the scheme, keeping each arrow's direction and converging routes. With a selection it tidies just that part.
- Ctrl+Shift+L redraws products so the part they share with their reactant lines up.
- Ctrl+Shift+N numbers compounds in scheme order; Shift+N on a structure edits its name and number.
Reactions from text
Reaction → Reaction Builder (Ctrl+Shift+R) builds a reaction from SMILES or SMARTS: one row per reactant and product, or a single reaction SMILES. It updates live, maps atoms automatically and lays the scheme out.
Atom mapping and bond changes
- Show Bond Changes: right-click an arrow, or Reaction → Arrow → Show Bond Changes, to colour bonds broken, formed and changed in that step. Steps without a mapping are mapped automatically first.
- Fixing the mapping: Ctrl+M turns on mapping mode. Drag from a reactant atom to a product atom to map them; drag onto empty canvas to unmap. Map numbers and partners show while it's on.
Styles and exporting
- Pick a style from the toolbar: default, ACS 1996, slides, poster or dark. The Style panel edits bond length, line widths, fonts, arrow and text spacing and more, and saves them as a style of your own.
- File → Export: SVG (Ctrl+E; ChemFox can reopen it), PDF, PNG at any resolution, EMF for Word and PowerPoint (Windows), and MOL/SDF.
- Ctrl+C copies an image plus SMILES; Edit → Copy As gives SMILES, InChI, InChIKey, MOL or an image.
- Paste a SMILES, InChI or MOL block with Ctrl+V; it lands at the cursor.
Files
- ChemFox documents are
.cmfxfiles. Older.chemfoxand.chemdocfiles still open. - File → Import Structure (Ctrl+I) opens MOL, SDF, SMILES and InChI files.
- Examples are in the
samplesfolder (Start menu → ChemFox samples on Windows). - Batch figures from the command line:
ChemFox --export input.cmfx out.svg --arrange --preset acs.
Keyboard reference
These are the defaults; all of them can be changed. Hover keys act on what's under the cursor (or the focused atom); commands use Ctrl.
On an atom
| C N O S P F H | Set the element |
| L · B · I | Chlorine · bromine · iodine |
| 1 2 3 | Grow a single, double or triple bond (and focus the new atom) |
| Shift+3…8 · R | Add a ring · benzene |
| Shift+C | Add an acetyl (Ac) |
| E | Expand or collapse a group label |
| Enter | Type a label |
| + = · - | Raise · lower the charge |
| . | Toggle a radical |
| Shift+N | Compound name and number |
On a bond
| 1 2 3 | Single, double, triple |
| W · H · Y | Wedge · hash · wavy (again to reverse) |
| F | Flip a wedge or a double bond's side |
| Shift+3…8 · R | Fuse a ring · benzene |
| Shift+N | Compound name and number |
On an arrow, text or name
| Enter | Edit the arrow's conditions, the text, or the name |
| K | Next arrow kind |
On empty canvas
| C N O… L B I | Add an atom |
| Shift+3…8 · R | Add a ring · benzene |
| Shift+C | Add an acetyl |
| A · T | Add an arrow · text |
Anywhere
| V G Shift+A Shift+B Shift+T | Select, Chain, Arrow, Bent arrow, Text tools |
| Tab | Next of several overlapping targets |
| Esc | Cancel, deselect, or finish with the focused atom |
| Delete Backspace | Delete |
| ← → ↑ ↓ | Nudge the selection (Shift: further), or move the focused atom |
Commands
| Ctrl+N O S | New, open, save |
| Ctrl+I · Ctrl+E | Import a structure · export SVG |
| Ctrl+Z · Ctrl+Shift+Z / Ctrl+Y | Undo · redo |
| Ctrl+X C V · Ctrl+A | Cut, copy, paste · select all |
| Ctrl+Shift+V | Paste a SMILES or InChI (dialog) |
| Ctrl+L | Clean structure (again: next orientation) |
| Ctrl+→ ↓ ← ↑ | Continue the reaction |
| Ctrl+Shift+A | Arrange scheme |
| Ctrl+Shift+L | Align products to reactants |
| Ctrl+Shift+N | Number compounds |
| Ctrl+Shift+R | Reaction Builder |
| Ctrl+M | Mapping mode |
| Ctrl++ - · Ctrl+0 · Ctrl+1 | Zoom in, out · fit · actual size |
| Ctrl+Alt+K | Keyboard Shortcuts (change keys, custom groups) |
| F1 | Keyboard reference in the app |
Changing keys
Edit → Keyboard Shortcuts (Ctrl+Alt+K) lists every action, bound or not:
- Commands: anything in the menus. Select one and press the new shortcut.
- Hover keys: the single keys above, per target (atom, bond, empty canvas…). Common groups like Boc, TBS, OMe or CO2Me are listed too: search for "Group" and give them a key.
- Groups: your own groups from SMILES, each with an optional key.
Changes apply immediately and are kept when you update ChemFox.
Updates, privacy and help
- Updates: ChemFox checks for a new version at most once a day and tells you if there is one. Help → Check for Updates checks now; untick Help → Check for Updates Automatically to stop it. Install a new version over the old one: your settings, keys and groups are kept.
- Privacy: nothing else ever leaves your computer: no accounts, no analytics. The update check only asks GitHub for the list of releases.
- Something broken? Help → Report a Problem, with your version (Help → About) and, ideally, the
.cmfxfile.