Skip to content
LumenaryAcademy
Quantum 80 min

Molecular orbitals

Atomic orbitals combine into orbitals that belong to the whole molecule, and the eigenvalues explain bond orders, why oxygen is magnetic, and why benzene is special.

Code tested · 6AI-draftedAwaiting review by a chemist

Your guides: Chloe · The Chemist, Margaret · The Analyst, Gideon · The Sceptic

MotivationH

What Lewis structures cannot explain

The Lewis structures and VSEPR shapes of Chemical bonding are astonishingly useful for a theory built from dots on paper. But they fail on some very ordinary molecules.

  • Oxygen is magnetic. The Lewis structure of O₂, O=O\mathrm{O{=}O} with two lone pairs on each atom, has every electron paired. Yet oxygen is paramagnetic: it is drawn into a magnetic field. A classic lecture demonstration, performed by trained staff because liquid oxygen is both extremely cold and a powerful oxidiser, pours it between the poles of a strong magnet, where it hangs as a pale blue bridge. Paramagnetism means unpaired electrons — two of them, it turns out.
  • Helium does not form He₂, though every atom has a pair of electrons to share.
  • Benzene is far more stable than any structure with three ordinary double bonds, and its six C–C bonds are all the same length, 139 pm.
  • Longer conjugated molecules are coloured, and their colour moves towards the red as they grow, as you saw with the dyes of Quantum mechanics for chemists.

All four have one explanation. Electrons in a molecule do not belong to atoms or to bonds between pairs of atoms; they occupy molecular orbitals that spread over the whole molecule. This lesson builds them from the atomic orbitals you know, by solving small matrix eigenvalue problems.

IntuitionH

Waves that add and cancel

Bring two hydrogen atoms together. Each electron's 1s wavefunction starts to overlap the other nucleus's. Waves that overlap combine, and there are two ways for two equal waves to combine: in phase, so that they add and pile up amplitude between the nuclei, or out of phase, so that they cancel and leave a node halfway between.

An electron in the in-phase combination spends extra time between the two nuclei, where it is attracted by both. Its energy is lower than in a separate atom: a bonding orbital. An electron in the out-of-phase combination is pushed out of the region between the nuclei, and its wavefunction must bend sharply through the node, which costs kinetic energy. Its energy is higher: an antibonding orbital.

Analogy, not a formal construction

Hang two identical pendulums side by side and join them with a weak spring. Alone, each swings at one frequency. Coupled, the pair has two patterns of motion: both swinging together (the spring is never stretched, so the frequency stays low) and swinging in opposition (the spring is stretched every swing, so the frequency is higher). Coupling splits one frequency into two. Coupling atomic orbitals splits one energy into two in the same way, and the stronger the coupling — the more the orbitals overlap — the larger the split.

One approximation makes the whole picture possible. Nuclei are thousands of times heavier than electrons, so the electrons rearrange almost instantly as the nuclei move. We can therefore fix the nuclei at some separation RR, solve for the electrons, and repeat for other values of RR. This is the Born–Oppenheimer approximation (Max Born and J. Robert Oppenheimer, 1927), and the energy as a function of RR is the molecule's potential energy curve, the landscape on which its nuclei vibrate (Spectroscopy).

DefinitionsH

LCAO and the variational principle

Definition— LCAO molecular orbital

A molecular orbital (MO) is a one-electron wavefunction spread over a molecule. In the linear combination of atomic orbitals (LCAO) approximation it is written as

ψ=∑μcμ ϕμ,\psi = \sum_{\mu} c_\mu \, \phi_\mu ,

a weighted sum of atomic orbitals ϕμ\phi_\mu centred on the atoms, with coefficients cμc_\mu to be found.

How should the coefficients be chosen? By the most useful theorem in quantum chemistry.

Theorem— The variational principle

For any well-behaved trial wavefunction ψ\psi, the energy expectation value

E[ψ]=∫ψ∗H^ψ dV∫ψ∗ψ dVE[\psi] = \frac{\int \psi^* \hat H \psi \, \mathrm{d}V}{\int \psi^* \psi \, \mathrm{d}V}

is greater than or equal to the true ground-state energy E0E_0, with equality only if ψ\psi is the true ground state.

Proof

Expand ψ\psi in the (orthonormal) eigenfunctions of H^\hat H: ψ=∑nanψn\psi = \sum_n a_n \psi_n with H^ψn=Enψn\hat H\psi_n = E_n\psi_n and E0≤E1≤⋯E_0 \le E_1 \le \cdots. Then ∫ψ∗H^ψ dV=∑n∣an∣2En≥E0∑n∣an∣2=E0∫ψ∗ψ dV\int\psi^*\hat H\psi\,\mathrm{d}V = \sum_n |a_n|^2 E_n \ge E_0 \sum_n |a_n|^2 = E_0 \int\psi^*\psi\,\mathrm{d}V, with equality only if every ana_n with En>E0E_n > E_0 is zero.

∎

So lower is always better: we choose the coefficients that make EE as small as possible. Setting ∂E/∂cμ=0\partial E/\partial c_\mu = 0 gives the secular equations, a generalised eigenvalue problem

Hc=E Sc,Hμν=∫ϕμH^ϕν dV,Sμν=∫ϕμϕν dV.\mathbf H \mathbf c = E\, \mathbf S \mathbf c, \qquad H_{\mu\nu} = \int \phi_\mu \hat H \phi_\nu \,\mathrm{d}V, \qquad S_{\mu\nu} = \int \phi_\mu \phi_\nu \, \mathrm{d}V .

For two identical atoms A and B with one orbital each, name the integrals: the Coulomb integral α=HAA\alpha = H_{AA} (roughly the energy of an electron in the atomic orbital, in the molecule), the resonance integral β=HAB\beta = H_{AB} (negative: the energy of coupling), and the overlap S=SABS = S_{AB}. Symmetry forces cA=±cBc_A = \pm c_B, and the two orbitals and energies are

ψ±=ϕA±ϕB2(1±S),E±=α±β1±S.\psi_\pm = \frac{\phi_A \pm \phi_B}{\sqrt{2(1 \pm S)}}, \qquad E_\pm = \frac{\alpha \pm \beta}{1 \pm S} .

Because β<0\beta < 0, E+E_+ is the bonding level. And because of the 1±S1 \pm S denominators, the antibonding orbital is raised more than the bonding one is lowered.

ComputationC

H₂⁺ and H₂

The hydrogen molecule-ion H₂⁺, two protons and one electron, is the simplest molecule. With one 1s orbital on each proton every integral has a closed form. In atomic units, with RR in bohr,

S=e−R(1+R+R23),j=1R−e−2R(1+1R),k=e−R(1+R),S = e^{-R}\left(1 + R + \tfrac{R^2}{3}\right), \quad j = \frac1R - e^{-2R}\left(1 + \tfrac1R\right), \quad k = e^{-R}(1 + R),

and the two LCAO energies, including the repulsion 1/R1/R between the protons, are

E±(R)=−12+1R−j±k1±S.E_\pm(R) = -\tfrac12 + \frac1R - \frac{j \pm k}{1 \pm S}.

Here jj is the attraction of one proton for an electron sitting in the other atom's orbital and kk is the corresponding attraction for the overlap density. The block below traces both curves, finds the bond length and bond energy, and then applies the variational principle once more by letting the 1s orbitals shrink, e−ζre^{-\zeta r}, with ζ\zeta chosen to minimise the energy.

python
import numpy as np

hartree_eV, bohr_pm = 27.211386, 52.917721

def integrals(R):
    """Overlap S, Coulomb j and exchange-like k for two hydrogen 1s orbitals a distance R (bohr) apart."""
    S = np.exp(-R) * (1 + R + R**2 / 3)
    j = 1 / R - np.exp(-2 * R) * (1 + 1 / R)
    k = np.exp(-R) * (1 + R)
    return S, j, k

def h2plus(R):
    """LCAO energies (hartree) of H2+, bonding and antibonding, including the 1/R repulsion of the protons."""
    S, j, k = integrals(R)
    return -0.5 + 1 / R - (j + k) / (1 + S), -0.5 + 1 / R - (j - k) / (1 - S)

print("Energies relative to H + H+ far apart; the bar shows the depth of the bonding curve.")
print("  R (pm)   bonding (eV)   antibonding (eV)")
for R_pm in [60, 80, 100, 132, 160, 200, 300, 400]:
    Eb, Ea = h2plus(R_pm / bohr_pm)
    bar = "#" * int(round(-(Eb + 0.5) * hartree_eV * 10)) if Eb < -0.5 else ""
    print(f"{R_pm:7d}   {(Eb + 0.5)*hartree_eV:10.2f}   {(Ea + 0.5)*hartree_eV:14.2f}   {bar}")

R = np.linspace(1.0, 6.0, 5001)
Eb, _ = h2plus(R)
i = np.argmin(Eb)
print(f"\nLCAO minimum: R_e = {R[i]*bohr_pm:.0f} pm, D_e = {(-0.5 - Eb[i])*hartree_eV:.2f} eV")

# Variational improvement: let the 1s orbitals shrink, exp(-zeta r). Kinetic energy scales as zeta^2,
# potential energy as zeta, so E(zeta, R) follows from the zeta = 1 integrals at distance zeta*R.
def h2plus_zeta(zeta, R):
    S, j, k = integrals(zeta * R)
    T = (0.5 - S / 2 + k) / (1 + S)                 # kinetic energy at zeta = 1
    V = -0.5 - (j + k) / (1 + S) - T                # electron-nucleus attraction at zeta = 1
    return zeta**2 * T + zeta * V + 1 / R
Z, RR = np.meshgrid(np.linspace(1.0, 1.5, 251), np.linspace(1.5, 3.0, 301), indexing="ij")
E = h2plus_zeta(Z, RR)
iz, ir = np.unravel_index(np.argmin(E), E.shape)
print(f"best zeta = {Z[iz, ir]:.2f}: R_e = {RR[iz, ir]*bohr_pm:.0f} pm, D_e = {(-0.5 - E[iz, ir])*hartree_eV:.2f} eV")
print("exact (from the full Schrodinger equation): R_e = 106 pm, D_e = 2.79 eV")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The bonding curve has a well: the simplest LCAO puts the minimum at 132 pm with a bond energy of 1.76 eV. The antibonding curve has no well at all; an electron in it pushes the nuclei apart. Letting the orbitals contract to ζ=1.24\zeta = 1.24 (they are pulled in by two protons instead of one) moves the bond length to 106 pm, exactly right, and the bond energy to 2.35 eV, closer to the true 2.79 eV and, as the variational principle promises, still below it in strength (above it in energy).

Bond order

Now fill the orbitals with electrons, at most two per orbital with opposite spins. Define

bond order=12 (electrons in bonding MOs−electrons in antibonding MOs).\text{bond order} = \tfrac12\,(\text{electrons in bonding MOs} - \text{electrons in antibonding MOs}).

H₂⁺ has one bonding electron: bond order ½. H₂ has two, paired in the bonding σ orbital: bond order 1, a bond 74 pm long that takes 4.48 eV (432 kJ/mol) to break. He₂ would have two bonding and two antibonding electrons: bond order 0, and since the antibonding orbital is raised more than the bonding one is lowered, two helium atoms repel. He₂⁺, with three electrons, has bond order ½ and does exist, in electrical discharges through helium.

↑↑↑↓+−+H 1sH 1sσ* (antibonding)σ (bonding)out of phase: a nodein phase: density between nuclei
Molecular orbitals of H₂. The in-phase combination of the two 1s orbitals is the bonding σ orbital, below the atomic level, with electron density built up between the nuclei; the out-of-phase combination is the antibonding σ* orbital, above it, with a node between the nuclei. H₂'s two electrons pair in σ.
Worked examplesH

Diatomic molecules of the second row

From lithium to neon the valence orbitals are 2s and 2p. Each pair of matching atomic orbitals gives a bonding and an antibonding MO:

  • the two 2s orbitals give σ2s\sigma_{2s} and σ2s∗\sigma^*_{2s};
  • the two 2p orbitals pointing along the bond give σ2p\sigma_{2p} and σ2p∗\sigma^*_{2p};
  • the two pairs of 2p orbitals perpendicular to the bond overlap side-on and give two degenerate π2p\pi_{2p} and two degenerate π2p∗\pi^*_{2p} orbitals.

Side-on overlap is weaker than head-on, so the π splitting is smaller than the σ splitting. One complication changes the order: in the lighter elements (up to nitrogen) the 2s and 2p energies are close enough that σ2s\sigma_{2s} and σ2p\sigma_{2p} mix, which pushes σ2p\sigma_{2p} above π2p\pi_{2p}. From oxygen on, 2s lies much lower, the mixing fades, and σ2p\sigma_{2p} is below π2p\pi_{2p}. Photoelectron spectra, which measure the energy needed to remove an electron from each orbital, confirm both orders.

↑↓↑↑↑↓↑↑↑↓↑↓↑↑↑↓↑↓↑↓↑↓↑↓σ*2pπ*2pπ2pσ2pσ*2sσ2sO 2pO 2pO 2sO 2sO atomO₂O atom
The valence molecular-orbital diagram of O₂. Twelve valence electrons fill the orbitals from the bottom; the last two go into the pair of degenerate π* orbitals, one in each with parallel spins (Hund's rule). Those two unpaired electrons make oxygen paramagnetic. Bond order = (8 − 4)/2 = 2.

The filling is mechanical enough to program. The block below fills the valence MOs of every second-row homonuclear diatomic, and of the oxygen ions, applying Hund's rule within each degenerate pair.

python
# Fill the valence molecular orbitals of second-row diatomics and read off bond order and unpaired electrons.
# Each level: (name, number of orbitals, +1 bonding / -1 antibonding), lowest first.
MIXED = [("σ2s", 1, +1), ("σ*2s", 1, -1), ("π2p", 2, +1), ("σ2p", 1, +1), ("π*2p", 2, -1), ("σ*2p", 1, -1)]
UNMIXED = [("σ2s", 1, +1), ("σ*2s", 1, -1), ("σ2p", 1, +1), ("π2p", 2, +1), ("π*2p", 2, -1), ("σ*2p", 1, -1)]

def fill(levels, electrons):
    bonding = antibonding = unpaired = 0
    config = []
    for name, n_orb, kind in levels:
        e = min(electrons, 2 * n_orb)
        electrons -= e
        if e == 0:
            continue
        config.append(f"({name})^{e}")
        if kind > 0:
            bonding += e
        else:
            antibonding += e
        # Hund's rule: in a set of n_orb degenerate orbitals, spread out before pairing
        unpaired += e if e <= n_orb else 2 * n_orb - e
    return (bonding - antibonding) / 2, unpaired, " ".join(config)

molecules = [("Li2", 2), ("Be2", 4), ("B2", 6), ("C2", 8), ("N2", 10),
             ("O2", 12), ("F2", 14), ("Ne2", 16), ("O2+", 11), ("O2-", 13), ("O2 2-", 14)]
print(f"{'species':7s} {'bond order':>10s} {'unpaired':>9s}   valence configuration")
for name, n_valence in molecules:
    # s-p mixing puts sigma2p above pi2p for the lighter elements (up to N2)
    levels = MIXED if name in ("Li2", "Be2", "B2", "C2", "N2") else UNMIXED
    order, unpaired, config = fill(levels, n_valence)
    print(f"{name:7s} {order:10.1f} {unpaired:9d}   {config}")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Oxygen comes out with bond order 2, as in the Lewis structure, but with two unpaired electrons, one in each π* orbital: the paramagnetism is explained. B₂ is paramagnetic too, which is the experimental evidence for the s–p mixed order: with the unmixed order its last two electrons would pair in σ2p\sigma_{2p}. Be₂ and Ne₂ have bond order 0, and neither forms a stable molecule; both are known only as extremely weakly bound pairs in cold gas-phase experiments.

Bond order tracks what we can measure (values from the NIST Chemistry WebBook and standard tables, rounded):

SpeciesBond orderBond length (pm)Energy to break the bond (kJ/mol)
N₂3110945
O₂⁺2.5112—
O₂2121498
O₂⁻ (superoxide)1.5about 130—
F₂1141159

Removing an electron from O₂ takes it out of an antibonding orbital, so O₂⁺ has a stronger, shorter bond than O₂ — the opposite of what "removing a bonding electron" intuition suggests, and a prediction no Lewis structure makes.

ComputationC

Hückel theory: π electrons from an adjacency matrix

For larger molecules we need a simpler model. In 1931 Erich Hückel, in Stuttgart, proposed one for the π electrons of planar conjugated hydrocarbons. Its assumptions are drastic and its success is remarkable.

Definition— Hückel model

Treat only the π electrons, with one 2p orbital per carbon atom, perpendicular to the molecular plane. In the secular equations Hc=ESc\mathbf H\mathbf c = E\mathbf S\mathbf c set

  • Hμμ=αH_{\mu\mu} = \alpha for every carbon;
  • Hμν=βH_{\mu\nu} = \beta if atoms μ\mu and ν\nu are bonded, and 00 otherwise;
  • S=I\mathbf S = \mathbf I (neglect overlap).

Then H=αI+βA\mathbf H = \alpha\mathbf I + \beta\mathbf A, where A\mathbf A is the adjacency matrix of the carbon skeleton, so the orbital energies are Ek=α+xkβE_k = \alpha + x_k\beta with xkx_k the eigenvalues of A\mathbf A. Since β<0\beta < 0, the largest xkx_k is the most bonding orbital.

The physics has been reduced to the shape of a graph: the π energies depend only on which atoms are joined. (This is the start of spectral graph theory; see Graph theory.) Below we build the matrices for ethene, buta-1,3-diene and benzene and diagonalise them with numpy.linalg.eigh.

python
import numpy as np
np.set_printoptions(precision=3, suppress=True)

def chain(n):
    """Adjacency matrix of a chain of n carbon atoms (a linear polyene)."""
    A = np.zeros((n, n))
    for i in range(n - 1):
        A[i, i + 1] = A[i + 1, i] = 1
    return A

def ring(n):
    A = chain(n)
    A[0, n - 1] = A[n - 1, 0] = 1
    return A

def huckel(A, n_electrons):
    """Hueckel MOs: H = alpha*I + beta*A, so E = alpha + x*beta with x the eigenvalues of A.
    beta < 0, so the LARGEST x is the LOWEST energy. Returns x (lowest energy first), coefficients, pi energy."""
    x, C = np.linalg.eigh(A)
    x, C = x[::-1], C[:, ::-1]                     # sort from most bonding to most antibonding
    occ = np.zeros(len(x))
    occ[: n_electrons // 2] = 2                     # closed shells only in this simple filling
    return x, C, float(occ @ x), occ

for name, A, ne in [("ethene", chain(2), 2), ("buta-1,3-diene", chain(4), 4), ("benzene", ring(6), 6)]:
    x, C, e_pi, occ = huckel(A, ne)
    homo, lumo = x[ne // 2 - 1], x[ne // 2]
    print(f"{name}: orbital energies alpha + x*beta with x = {x}")
    print(f"   pi energy = {ne}alpha + {e_pi:.3f}beta;  HOMO-LUMO gap = {homo - lumo:.3f}|beta|")
    print(f"   delocalisation energy vs {ne // 2} isolated ethene(s): {e_pi - ne:.3f}beta")

# Butadiene's MOs: count the sign changes (nodes) along the chain, and the pi bond orders
x, C, e_pi, occ = huckel(chain(4), 4)
print("\nbutadiene MO coefficients (columns = MOs, lowest energy first):\n", C * np.sign(C[0]))
for k in range(4):
    print(f"   MO {k + 1}: x = {x[k]:+.3f}, nodes = {int(np.sum(np.diff(np.sign(C[:, k])) != 0))}")
P = (C * occ) @ C.T                                 # Coulson pi bond orders p_rs = sum_i n_i c_ri c_si
print("pi bond orders: C1-C2 =", round(P[0, 1], 3), " C2-C3 =", round(P[1, 2], 3))
_, Cb, _, occb = huckel(ring(6), 6)
print("benzene: every C-C pi bond order =", round(((Cb * occb) @ Cb.T)[0, 1], 3))
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Read the output as a chemist:

  • Ethene has one bonding π orbital at α+β\alpha + \beta and one antibonding at α−β\alpha - \beta: the π bond.
  • Butadiene's four MOs have 0, 1, 2 and 3 nodes, exactly like the particle in a box — Hückel orbitals of a chain are sampled box wavefunctions. Its π energy, 4α+4.472β4\alpha + 4.472\beta, is lower than two separate ethenes by 0.472β0.472\beta, the delocalisation energy. The π bond orders, 0.894 for the outer bonds and 0.447 for the middle one, say that the central bond has partial double-bond character, consistent with its being shorter (about 147 pm) than a typical C–C single bond (154 pm).
  • Benzene has π energy 6α+8β6\alpha + 8\beta, lower than three ethenes by 2β2\beta. With the thermochemical value β≈−75\beta \approx -75 kJ/mol, that is about 150 kJ/mol of extra stability, the same size as the "resonance energy" estimated from heats of hydrogenation (Thermochemistry). All six bonds have the same π bond order, 2/3.
ExplanationH

Rings, aromaticity and the 4n + 2 rule

Benzene's extra stability belongs to a family. For a ring of NN atoms Hückel's matrix can be diagonalised by hand.

Theorem— Hückel energies of a ring

The adjacency matrix of a ring of NN atoms has eigenvalues xk=2cos⁡(2πk/N)x_k = 2\cos(2\pi k/N), k=0,1,…,N−1k = 0, 1, \ldots, N-1, with eigenvectors cj=e2πijk/Nc_j = e^{2\pi i jk/N}. So a ring has one lowest level (k=0k = 0, x=2x = 2), then degenerate pairs (kk and N−kN - k), and, if NN is even, one highest level (x=−2x = -2).

Proof

Row jj of Ac\mathbf A\mathbf c is cj−1+cj+1c_{j-1} + c_{j+1} (indices modulo NN). With cj=ωjkc_j = \omega^{jk}, ω=e2πi/N\omega = e^{2\pi i/N}, this is ωjk(ω−k+ωk)=2cos⁡(2πk/N) cj\omega^{jk}(\omega^{-k} + \omega^{k}) = 2\cos(2\pi k/N)\, c_j. The NN vectors with k=0,…,N−1k = 0, \ldots, N-1 are linearly independent (they are the columns of the discrete Fourier transform), so these are all the eigenvalues. Since cos⁡(2πk/N)=cos⁡(2π(N−k)/N)\cos(2\pi k/N) = \cos(2\pi(N-k)/N), levels kk and N−kN-k coincide.

∎

The ring's MOs are standing waves running round the ring, the discrete version of a particle on a circle, built from the complex numbers ωjk\omega^{jk}. A neat picture follows: draw a circle of radius 2∣β∣2|\beta| centred on α\alpha, inscribe the ring polygon with one vertex at the bottom, and the vertices sit at the orbital energies (the Frost circle, after Arthur Frost and Boris Musulin, 1953).

↑↓↑↓↑↓↑↓↑↑α + 2βα + βα − βα − 2βα + 2βαα − 2βbenzene: 6 π electrons, closed shellcyclobutadiene: 4 π electrons, 2 unpaired
Frost circles. The vertices of the inscribed polygon give the Hückel levels of the ring. Benzene's six π electrons exactly fill the lowest level and the bonding pair: a closed shell. Cyclobutadiene's four π electrons fill the lowest level and then must put one electron in each of a degenerate nonbonding pair: two unpaired electrons.

The pattern — one level, then pairs — means a ring's bonding levels are completely filled by 2,6,10,14,…2, 6, 10, 14, \ldots electrons, that is 4n+24n + 2. With 4n4n electrons the last pair of degenerate orbitals is half full. The block checks the theorem and compares rings with the open chains made of the same atoms and electrons.

python
import numpy as np

def chain(n):
    A = np.zeros((n, n))
    for i in range(n - 1):
        A[i, i + 1] = A[i + 1, i] = 1
    return A

def ring(n):
    A = chain(n)
    A[0, n - 1] = A[n - 1, 0] = 1
    return A

def fill(A, n_electrons, tol=1e-6):
    """Aufbau with Hund's rule over degenerate shells of H = alpha + x*beta.
    Returns (pi energy in units of beta, unpaired electrons, HOMO-LUMO gap in |beta|)."""
    x = np.sort(np.linalg.eigvalsh(A))[::-1]          # most bonding (largest x) first
    shells = []
    for v in x:
        if shells and abs(shells[-1][0] - v) < tol:
            shells[-1][1] += 1
        else:
            shells.append([v, 1])
    energy, unpaired, left, gap = 0.0, 0, n_electrons, None
    for i, (v, g) in enumerate(shells):
        e = min(left, 2 * g)
        left -= e
        energy += e * v
        unpaired += e if e <= g else 2 * g - e
        if gap is None and 0 < e < 2 * g:
            gap = 0.0                                  # a partly filled shell: HOMO = LUMO
        elif gap is None and e == 2 * g and left == 0:
            gap = v - shells[i + 1][0]
    return energy, unpaired, gap

# The eigenvalues of a ring of N atoms are 2cos(2 pi k / N): check it
for N in range(3, 9):
    assert np.allclose(np.sort(np.linalg.eigvalsh(ring(N))), np.sort(2 * np.cos(2 * np.pi * np.arange(N) / N)))
print("ring eigenvalues equal 2cos(2 pi k/N) for N = 3..8\n")

cases = [("cyclopropenyl cation", 3, 2), ("cyclobutadiene", 4, 4), ("cyclopentadienyl cation", 5, 4),
         ("cyclopentadienyl anion", 5, 6), ("benzene", 6, 6), ("tropylium cation", 7, 6),
         ("cyclooctatetraene, planar", 8, 8), ("cyclooctatetraene dianion", 8, 10)]
print(f"{'species':27s} {'pi e':>4s} {'4n+2':>5s} {'unpaired':>8s} {'gap/|beta|':>10s} {'ring - chain':>13s}")
for name, N, ne in cases:
    e_ring, unpaired, gap = fill(ring(N), ne)
    e_chain, _, _ = fill(chain(N), ne)               # the same atoms and electrons, ring opened
    print(f"{name:27s} {ne:4d} {'yes' if (ne - 2) % 4 == 0 else 'no':>5s} {unpaired:8d} {gap:10.3f} {e_ring - e_chain:+9.3f} beta")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Since β\beta is negative, a positive number in the last column means closing the ring lowers the energy. Every 4n+24n + 2 species is a closed shell with a sizeable HOMO–LUMO gap and is stabilised by ring closure: these are aromatic. The cyclopentadienyl anion and the tropylium cation are real, stable ions for exactly this reason, though neither is benzene. Every 4n4n species has two unpaired electrons in a degenerate pair and no gap. Cyclobutadiene and the cyclopentadienyl cation are even destabilised by closing the ring: they are antiaromatic. Real cyclobutadiene escapes by distorting to a rectangle with alternating bonds and survives only at very low temperatures or trapped in frozen inert gas. Cyclooctatetraene escapes differently: it folds into a tub shape, its π orbitals stop overlapping round the ring, and it behaves as an ordinary polyene — while its planar dianion, with ten π electrons, is aromatic.

ExplanationH

HOMO and LUMO

Two orbitals matter more than the rest: the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO), together called the frontier orbitals.

  • Colour and light. The lowest-energy electronic absorption usually lifts an electron from HOMO to LUMO. Butadiene's gap, 1.236∣β∣1.236|\beta|, is smaller than ethene's, 2∣β∣2|\beta|, and it keeps shrinking along the polyene series, which is why long conjugated molecules such as β-carotene (eleven conjugated C=C bonds) absorb visible light and look orange. Measuring such absorptions is the subject of Spectroscopy.
  • Ionisation. By Koopmans' theorem (Tjalling Koopmans, 1934), the energy needed to remove an electron from an orbital is approximately minus that orbital's energy. Photoelectron spectroscopy measures these energies directly and is how MO diagrams such as the one for O₂ are checked.
  • Reactivity. When two molecules react, the largest stabilising interaction is usually between the HOMO of one and the LUMO of the other, because those orbitals are closest in energy. Kenichi Fukui in Kyoto developed this idea from 1952, and R. B. Woodward and Roald Hoffmann at Harvard used orbital symmetry to explain which ring-forming reactions are allowed; Fukui and Hoffmann shared the 1981 Nobel Prize in Chemistry. You will meet frontier orbitals again in Reaction mechanisms, where nucleophiles donate from their HOMO into an electrophile's LUMO.
ExplanationH

The professional view

Hückel theory packs a great deal of insight into a 6 × 6 matrix, and chemists still use it to reason about π systems on the back of an envelope. But practising chemists compute molecular orbitals with far more complete methods. Roald Hoffmann's extended Hückel method (1963) kept every valence orbital and the overlaps, and became the workhorse of qualitative inorganic and solid-state chemistry. Today Hartree–Fock and density functional theory, the subjects of Computational chemistry, solve the same secular equations Fc=εSc\mathbf F\mathbf c = \varepsilon\mathbf S\mathbf c self-consistently with all electrons and realistic basis sets, and produce the coloured orbital plots in research papers. The same mathematics, applied to a crystal with a lattice of atoms, gives band structures: the Hückel ring with N→∞N \to \infty is, in this model, a one-dimensional metal (see electronic structure and bands in Lumenary Materials).

The qualitative lessons survive every upgrade: count nodes, match symmetry, fill from the bottom, look at the HOMO and the LUMO.

Common misconceptionsH

Common misconceptions

Misconception

"Antibonding orbitals are empty, so they don't matter." In He₂, F₂ and O₂ they are occupied, and their electrons cancel bonding. And empty ones matter too: a reagent that pushes electrons into a molecule's σ* or π* LUMO weakens exactly the bond that orbital belongs to, which is how many reactions begin.

Misconception

"Benzene's double bonds flip back and forth between two positions." The two Kekulé structures are two drawings of one molecule, not two molecules interconverting. Benzene has a single structure with six equal bonds and six π electrons in delocalised orbitals.

Misconception

"Bond orders must be whole numbers." O₂⁺ has bond order 2.5 and benzene's π bond orders are 2/3. Bond order is a count of electrons in bonding minus antibonding orbitals, not a count of lines in a drawing.

Misconception

"Molecular orbitals are just the bonds of a Lewis structure." Canonical MOs, the eigenvectors, spread over the whole molecule: methane has one low MO of one symmetry and three equal higher ones, not four identical C–H bond orbitals, and photoelectron spectra show those two energies. Localised bond orbitals can be built by mixing occupied MOs, which leaves the total energy and electron density unchanged; both descriptions are correct, and each is convenient for different questions.

Exercises

Exercises

1. Molecular orbitals

Warm-upHuman

According to molecular-orbital theory, why do two helium atoms not form a covalently bonded He₂ molecule?

Choose one

2. Molecular orbitals

CoreHuman

How many unpaired electrons does the B₂ molecule have in its ground state? (Boron has three valence electrons, and in B₂ the π2p\pi_{2p} orbitals lie below σ2p\sigma_{2p} because of s–p mixing.)

3. Molecular orbitals

CoreHuman

Which of these species are paramagnetic (have unpaired electrons)? Select all that apply.

Choose all that apply

4. Molecular orbitals

CoreHuman

Which species has the shortest oxygen–oxygen bond?

Choose one

5. Molecular orbitals

Warm-upHuman

Hexa-1,3,5-triene has six π electrons in six Hückel MOs. How many nodes (sign changes of the coefficients along the chain) does its HOMO have?

6. Molecular orbitals

CoreHuman

A cyanide ion attacks the carbon atom of a C=O group in a ketone. In frontier-orbital terms, which interaction drives the reaction?

Choose one

7. Molecular orbitals

CoreComputational

Write huckel_pi_energy(bonds, n_atoms, n_electrons). bonds is a list of pairs (i, j) of bonded atoms numbered from 0. Build the Hückel adjacency matrix, and return a tuple (x, e_pi):

  • x: the eigenvalues of the adjacency matrix as a NumPy array sorted from largest to smallest (most bonding first, since E=α+xβE = \alpha + x\beta and β<0\beta \lt 0);
  • e_pi: the coefficient of β\beta in the total π energy, filling two electrons per orbital from the most bonding (if n_electrons is odd, the last orbital gets one).

The tests use benzene, the allyl cation and naphthalene, whose delocalisation energy you will find.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

8. Molecular orbitals

StretchComputational

Write unpaired_electrons(A, n_electrons), which takes a Hückel adjacency matrix and an electron count and returns the number of unpaired electrons when the orbitals are filled from the most bonding, applying Hund's rule within degenerate levels (electrons spread singly over a set of equal-energy orbitals before pairing).

Eigenvalues from floating-point diagonalisation are never exactly equal, so treat two eigenvalues as degenerate when they differ by less than 10−610^{-6}.

The tests include cyclobutadiene, benzene, the cyclopentadienyl radical and trimethylenemethane, C(CH₂)₃, a central carbon bonded to three others.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Further reading and resources