This simulation visualises infrared absorption spectroscopy of five common molecules — H₂O, CO₂, CH₄, HCl and NH₃ — using the Beer-Lambert law. Each molecule's vibrational bands are modelled as Lorentzian absorption lines at their real fundamental wavenumbers, and for light diatomic-like stretches the model adds rotational P- and R-branch fine structure from a rigid-rotor approximation. A companion energy-level diagram shows the v=0 → v=1 vibrational transition behind each band, so you can connect the spectrum directly to the underlying quantum jump.
A synthetic IR transmittance spectrum from 400–4000 cm⁻¹ built from each molecule's real absorption bands (e.g. H₂O's 1595, 3400 and 3756 cm⁻¹ modes; CO₂'s 667 and 2349 cm⁻¹ modes). Strong stretching bands with a sizeable rotational constant B display resolved P/R rotational lines whose relative intensities follow a Boltzmann population factor at the chosen temperature.
Choose a molecule from the dropdown (H₂O, CO₂, CH₄, HCl, NH₃). Drag the Temperature slider (80–1500 K) to change level populations and band broadening, the Resolution slider (0.5–50 cm⁻¹) to sharpen or blur the rotational fine structure, and the Concentration × Path slider (0.1–5) to scale absorbance via the Beer-Lambert law. The info box below the controls updates with facts about the selected molecule's bands.
HCl has one of the cleanest rotational-vibrational spectra of any molecule — its P- and R-branch lines are evenly spaced by roughly 2B, and at high resolution you can even see the mass difference between the ³⁵Cl and ³⁷Cl isotopes as tiny doublets in each line.
The Beer-Lambert law relates absorbance to concentration and path length: A is proportional to c times l times the molecule's absorption coefficient. In this simulation the Concentration × Path slider directly scales that product, so higher values push more bands towards full absorption (transmittance near zero) while lower values leave the spectrum mostly transparent.
Rotational fine structure only appears for strong stretching bands of molecules with a sufficiently large rotational constant B, such as HCl and NH₃. Bending and combination bands, and molecules with a very small B like CO₂, are rendered as simple smooth Lorentzian lines because their rotational spacing would be too fine or the population too spread out to matter for the visualisation.
Temperature enters in two ways: a Boltzmann factor slightly changes each band's effective intensity, and for bands with resolved rotational structure it reshapes the P/R branch envelope, since higher J rotational levels become more populated at higher temperature. Raising the Temperature slider therefore broadens and redistributes intensity across the rotational lines of eligible bands.
They are rotational-vibrational transitions accompanying the vibrational jump. The R-branch (ΔJ = +1) lines sit above the band centre and the P-branch (ΔJ = −1) lines sit below it, spaced by approximately 2B(J+1) and 2B·J respectively. Their relative heights follow the (2J+1)·exp(−hcBJ(J+1)/kT) population distribution, which is why the branch envelope has a characteristic peak away from the band centre.
It is a simplified but physically grounded model rather than a full ab initio calculation. Band positions and intensities are taken from real experimental values, the lineshapes use a standard Lorentzian broadening function, and the rotational fine structure uses the textbook rigid-rotor P/R branch formula with a genuine Boltzmann population factor — enough to reproduce the qualitative and semi-quantitative appearance of a real IR spectrum.