Computational Methods

6. Computational Methods

6.1. Matrices

We can write the ODEs here in matrix form:

\[\hat{H}\phi = \mathcal{E}\,\phi \Rightarrow H_{ij}\,\phi_j = E\,\phi_i\]

where here the Hamiltonian operator has the form:

\[\hat{H} = \hat{T} + V\]

\(T\) is the kinetic energy, which in differential form looks like:

\[\hat{T} = -\frac{\hbar^2}{2m}\nabla^2\]

In Hartree units, we can write this in matrix form as:

\[-\frac{1}{2}D^2\]

where \(D\) is a differentiation operator, which follows:

\[\begin{split}D \begin{pmatrix} f_0 \\ f_1 \\ \vdots \\ f_{N-1} \end{pmatrix} = \begin{pmatrix} f_0' \\ f_1' \\ \vdots \\ f_{n-1}'\end{pmatrix} \end{split}\]

\(V\) is the potential operator, which in the differential form just multiplies the wavefunction \(V\,\phi\), but in matrix form it will be some diagonal matrix:

\[\begin{split}V_{ij} = \begin{pmatrix} V_0 & 0 & \dots & 0\\ 0 & V_1 & \dots & 0 \\ \vdots & \vdots & \ddots & 0 \\ 0 & 0 & 0 & V_{N-1}\end{pmatrix}\end{split}\]

6.2. Integrals

We often need to find an integral, for example the Hartree potential:

\[V_H = \int \frac{\rho(r')}{|r-r'|}\,\mathrm{d}r'\]

we can write this in matrix form also:

\[V_i = \int \frac{\rho(r_j)}{|r_i-r_j|}\,\mathrm{d}r\]

and to calculate the integral we can just apply a trapezium rule expression:

\[I_i = \int f(x_i)\,\mathrm{d}x = \sum \Big[f(x_i)\,\Delta x\Big]\]

so here:

\[V_i = \sum \left[\frac{\rho(r_j)\,\Delta r}{\sqrt{(r_i-r_j)^2}}\right]\]