Learning Scientific Programming with Python (2nd edition)
P3.3.2: The Lennard-Jones Interaction Potential
Question P3.3.2
A simple model for the interaction potential between two atoms as a function of their distance, $r$, is that of Lennard-Jones: $$ U(r) = \frac{B}{r^{12}} - \frac{A}{r^6}, $$ where $A$ and $B$ are positive constants. (This was popular in the early days of computing because $r^{-12}$ is easy to compute as the square of $r^{-6}$.)
For Argon atoms, these constants may be taken to be $A = 1.024 \times 10^{-23}\;\mathrm{J\,nm^{6}}$ and $B = 1.582 \times 10^{-26}\;\mathrm{J\,nm^{12}}$.
(a) Plot $U(r)$. On a second y-axis on the same figure, plot the interatomic force: $$ F(r) = -\frac{\mathrm{d}U}{\mathrm{d}r} = \frac{12B}{r^{13}} - \frac{6A}{r^7}. $$
Your plot should show the "interesting" part of these curves, which tend rapidly to very large values at small $r$.
Hints: Life is easier if you divide $A$ and $B$ by Boltzmann's constant, $1.381 \times 10^{-23}\;\mathrm{J\,K^{-1}}$ so as to measure $U(r)$ in units of K. What is the depth, $\epsilon$, and location, $r_0$, of the potential minimum for this system?
(b) For small displacements from the equilibrium interatomic separation (where $F=0$), the potential may be approximated to the harmonic oscillator function, $V(r) = \frac{1}{2}k(r-r_0)^2 + \epsilon$, where $$ k = \left| \frac{\mathrm{d}^2U}{\mathrm{d}r^2} \right|_{r_0} = \frac{156B}{r_0^{14}} - \frac{42A}{r_0^8} $$
Plot $U(r)$ and $V(r)$ on the same diagram.