Quantum Theoretical Chemistry, NWI-MOL112 (3EC)

Computer assignment 2

Read the entire assignment before you start coding (26-Mar-2020).

Harmonic oscillator with the second order finite difference method

  1. Read chapter 6.1 of the lecture notes on the second order finite difference method for one-dimensional problems.
  2. Use this method to solve the harmonic oscillator problem: take mass \(m=1\) and force constant \(k=1\) equal to one and find the range and grid spacing needed to converge the first four levels to with 10-4 (all in atomic units).
  3. Plot the wave functions.
  4. Continue with the Morse potential for HF problem: assign2.pdf.

Possible optimizations and improvements

Use these only after you code is producing correct results.

Some intermediate results to help debug your code

Harmonic oscillator

Take a grid from -4 to 4 in steps of 0.05 (atomic units). This gives a grid of 161 points. With \(m=1\) and \(k=1\) the upper left corner of the potential energy matrix should look like this
  V = 
   8.0000        0        0        0        0
        0   7.8013        0        0        0
        0        0   7.6050        0        0
        0        0        0   7.4113        0
        0        0        0        0   7.2200
The upper left corner of the kinetic energy matrix should look like this:
  T =
   400.00000  -200.00000    -0.00000    -0.00000    -0.00000
  -200.00000   400.00000  -200.00000    -0.00000    -0.00000
    -0.00000  -200.00000   400.00000  -200.00000    -0.00000
    -0.00000    -0.00000  -200.00000   400.00000  -200.00000
    -0.00000    -0.00000    -0.00000  -200.00000   400.00000
and the first 5 energies in this approximation are
   0.49992
   1.49962
   2.49913
   3.49930
The harmonic oscillator functions should look something like

[figure failed, try Wikipedia]

To make the plot look better, I adapted the sign of the wave functions such the the value for grid point number 5 is positive. Also, I divided the eigenvectors by the square-root of the step size, to normalize them.

Morse potential for HF

The potential should look like this (in atomic units):

[report problem to GCG]

With a grid from \(r=1\) to \(r=4\) in steps of 0.05 \(a_0\) I get these energies for \(J=0\), (in cm-1):

  e =
    2036.26
    5956.58
    9666.43
   13173.30
The exact \(v=0, J=0\) result with the formula from Wikipedia is 2046.64 cm-1, and for \(v=3, J=0\) it is 13380.69 cm-1.

The vibrational term values in cm-1:

G(v)=we*(v+0.5)-wexe*(v+0.5)^2+weye*(v+0.5)^3

             computed        exact       diff
_____________________________________________
       we     4126.75      4138.32   -11.5659
     wexe     104.641        89.88    14.7606
     weye    0.265076            0     0.2651
Vibrational energies in cm-1 for J=0, 1, 2, 3
v\J   0         1         2         3
________________________________________
0  2036.26   2077.48   2159.88   2283.35
1  5956.58   5996.44   6076.13   6195.52
2  9666.43   9704.94   9781.93   9897.27
3 13173.30  13210.47  13284.76  13396.07

Note that these results are not necessarily converged to all digits shown. If you use the same grid as mentioned above, you expect these results though.

Report

Instructions for writing you report are given on the main page.

HTML5-validator Last updated: 29-Mar-2020, by Gerrit C. Groenenboom.