3.3 Exercise on Plotting

A simple model for the interaction potential between two atoms as a function of their distance, \(r\), is that of Lennard-Jones15:

\[U(r) = \dfrac{B}{ r^{12}} − \dfrac{A}{r^{6}}\]

\(A\) and \(B\) are positive constants16.

  1. Plot \(U(r)\) for Argon atoms where \(A = 1.024 \times 10^{−23}\) J nm\(^6\) and \(B = 1.582 \times 10^{−26}\) J nm\(^{12}\).
    Your plot should show the “interesting” part of this curve, which tends rapidly to very large values at small \(r\).

  2. What is the depth, \(\epsilon\), and location, \(r_0\), of the potential minimum for this system?17 Indicate these values by drawing horizontal and vertical lines at these locations18.

  3. On a second y-axis19 on the same figure, plot the interatomic force given by: \[F(r) = −\dfrac{dU}{dr} = \dfrac{12 B}{ r^{13}} − \dfrac{6 A}{r^{7}} \]

  4. For small displacements from the equilibrium interatomic separation (where \(F = 0\)), the potential may be approximated to the harmonic oscillator function, \(V(r) = \dfrac{1}{2}k(r-r_0)^2+ \epsilon\) where

\[k = \left|\dfrac{d^2U}{dr^2}\right|_{r_0}= \dfrac{156 B}{ {r_0}^{14}} − \dfrac{42 A}{{r_0}^{8}} \]

  1. Plot \(U(r)\) and \(V(r)\) on the same figure but as a separate subplot.

  1. This was popular in the early days of computing because \(r^{−12}\) is easy to compute as the square of \(r^{−6}\).↩︎

  2. Life is easier if you divide A and B by Boltzmann’s constant, \(1.381\times 10^{−23}\) JK\(^{−1}\) so as to measure U(r) in units of K.↩︎

  3. Think like a scientist not a programmer!↩︎

  4. Hint: Look up plt.hlines() and plt.vlines().↩︎

  5. Hint: Look up twinx()↩︎