This Demonstration simulates intermolecular forces between two small molecules. The three types of intermolecular forces are hydrogen bonding, dipole–dipole interactions and van der Waals interaction (London dispersion forces). Use the tabs to switch among "" (water molecules to show hydrogen bonding), "" (hydrochloric acid molecules to show dipole–dipole interactions) and "" (chlorine molecules that interact via London dispersion forces). The "intermolecular distance (Å)" slider varies the distance between the molecules, which is reflected both in the top graphic and in the energy diagram. To see the relative strengths of the intermolecular forces, compare the energy diagrams for each of the molecule pairs. Deeper energy wells indicate a stronger force.
The intermolecular potential energy can be represented by the Lennard-Jones potential:
where is the interaction energy between two molecules and , the equilibrium intermolecular distance. The values of and depend on the molecular system, and are intended only to show relative trends. The intermolecular distance for all three pairs is set equal to 4.5 angstroms.
 B. F. Torrence and E. A. Torrence, The Student's Introduction to Mathematica: A Handbook for Precalculus, Calculus, and Linear Algebra, 2nd ed., New York: Cambridge University Press, 2009.