Add:

How to bond: Click one atom to select it (cyan halo), then click a second atom to cycle their covalent bond (single → double → triple → none). Drag any atom to reposition it, or drop one atom onto another to bond them.

Covalent Bonding Workbench 2D workspace displaying atoms, lone electron pairs, unpaired valence dots, and single, double, or triple covalent bonds.
Unpaired valence electron (needs a bond) Non-bonding lone pair — / ═ / ≡ Single, double, or triple covalent bond

Keyboard & Touch Controls

  • 1 2 3 4 5 — Add C, H, O, N, or Cl to the workbench.
  • [ and ] — Cycle which atom on the workbench is selected.
  • Arrow keys — Move the selected atom (hold Shift for larger steps).
  • Enter or Space (inside workbench) — Mark the selected atom as a bond anchor, select another atom with ], and press Enter to cycle their single/double/triple bond.
  • B — Cycle the bond between the selected atom and its nearest neighbor.
  • F — Auto-fill open valence electrons with Hydrogen atoms.
  • L — Tidy bond spacing; Del / Backspace — Delete selected atom; R — Clear workbench.

Why Valence Electrons Matter

Main-group nonmetals form covalent bonds by sharing pairs of outer-shell (valence) electrons until Hydrogen reaches 2 electrons (the duet rule) and Carbon, Nitrogen, Oxygen, and Chlorine reach 8 electrons (the octet rule):

  • Carbon (4 valence e⁻): Needs 4 bonds (four singles, two doubles as in CO₂, a single + triple as in HCN, or rings as in C₆H₆).
  • Nitrogen (5 valence e⁻): Keeps 1 lone pair and forms 3 bonds (as in NH₃ or N≡N).
  • Oxygen (6 valence e⁻): Keeps 2 lone pairs and forms 2 bonds (as in H₂O or O=O).
  • Hydrogen (1 e⁻) & Chlorine (7 e⁻): Each forms 1 covalent bond; Chlorine keeps 3 lone pairs.