\documentstyle[a4wide,12pt]{article} \newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}} \newcommand{\OP}[1]{{\bf\widehat{#1}}} \begin{document} \section*{Introduction to numerical projects} Here follows a brief recipe and recommendation on how to write a report for each project. \begin{itemize} \item Give a short description of the nature of the problem and the eventual numerical methods you have used. \item Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself. \item Include the source code of your program. Comment your program properly. \item If possible, try to find analytic solutions, or known limits in order to test your program when developing the code. \item Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes. \item Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc. \item Try to give an interpretation of you results in your answers to the problems. \item Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it. We do appreciate your comments. \item Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning. \end{itemize} \section*{Format for electronic delivery of report and programs} % The preferred format for the report is a PDF file. You can also use DOC or postscript formats. As programming language we prefer that you choose between C/C++ and Fortran90/95. You could also use Java or Python as programming languages. Matlab/Maple/Mathematica/IDL are not accepted, but you can use them to check your results where possible. Finally, we do prefer that you work together. Optimal working groups consist of 2-3 students, but more people can collaborate. You can then hand in a common report. \section*{Project 2, Hartree-Fock, improved Monte Carlo and density functional theory, deadline May 31} The aim of this project is twofold: first we will perform Hartree-Fock calculations in order to obtain an optimal basis for the single-particle wave functions Beryllium. These new single-particle wave functions are in turn used in an improved variational Monte Carlo calculation (VMC). We will reuse our VMC from project 1, but this time there is no need to vary the parameter $\alpha$ of the single-particle wave functions. However, we will introduce a slightly more complicated Pade-Jastrow correlation function. The second step is to parameterize, using the VMC wave function, a density functional for beryllium. This functional will then be compared with the simple local density approximation discussed in for example Thijssen's text, chapter 5. \section*{Exercise 1: Hartree-Fock and Variational Monte Carlo calculations of the beryllium atom} The Hartree-Fock functional is written as \[ E[\Phi] = \sum_{\mu=1}^N \int \psi_{\mu}^*(\mathbf{r}_i)\hat{h_i}\psi_{\mu}(\mathbf{r}_i) d\mathbf{r}_i + \frac{1}{2}\sum_{\mu=1}^N\sum_{\nu=1}^N \left[ \int \psi_{\mu}^*(\mathbf{r}_i)\psi_{\nu}^*(\mathbf{r}_j)\frac{1} {r_{ij}}\psi_{\mu}(\mathbf{r}_i)\psi_{\nu}(\mathbf{r}_j) d\mathbf{r}_i\mathbf{r}_j \right. \] \[ \left. - \int \psi_{\mu}^*(\mathbf{r}_i)\psi_{\nu}^*(\mathbf{r}_j) \frac{1}{r_{ij}}\psi_{\nu}(\mathbf{r}_i)\psi_{\mu}(\mathbf{r}_i) d\mathbf{r}_i\mathbf{r}_j\right]. \] The more compact version is \[ E[\Phi] = \sum_{\mu=1}^N \langle \mu | h | \mu\rangle+ \frac{1}{2}\sum_{\mu=1}^N\sum_{\nu=1}^N\left[\langle \mu\nu |\frac{1}{r_{ij}}|\mu\nu\rangle-\langle \mu\nu |\frac{1}{r_{ij}}|\nu\mu\rangle\right]. \] With the given functional, we can perform at least two types of variational strategies. \begin{itemize} \item Vary the Slater determinant by changing the spatial part of the single-particle wave functions themselves. \item Expand the single-particle functions in a known basis and vary the coefficients, that is, the new function single-particle wave function $|a\rangle$ is written as a linear expansion in terms of a fixed basis $\phi$ (harmonic oscillator, Laguerre polynomials etc) \[ \psi_a = \sum_{\lambda} C_{a\lambda}\phi_{\lambda}, \] \end{itemize} Both cases lead to a new Slater determinant which is related to the previous via a unitary transformation. The second one is the one we will use in this project. \begin{enumerate} \item[1a)] Consider a Slater determinant built up of single-particle orbitals $\psi_{\lambda}$, with $\lambda = 1,2,\dots,N$. The unitary transformation \[ \psi_a = \sum_{\lambda} C_{a\lambda}\phi_{\lambda}, \] brings us into the new basis. Show that the new basis is orthonormal. Show that the new Slater determinant constructed from the new single-particle wave functions can be written as the determinant based on the previous basis and the determinant of the matrix $C$. Show that the old and the new Slater determinants are equal up to a complex constant with absolute value unity. (Hint, $C$ is a unitary matrix). \item[1b)] Minimizing with respect to $C^*_{k\alpha}$, remembering that $C^*_{k\alpha}$ and $C_{k\alpha}$ are independent and defining \[ h_{\alpha\gamma}^{HF}=\langle \alpha | h | \gamma \rangle+ \sum_{a=1}^N\sum_{\beta\delta} C^*_{a\beta}C_{a\delta}\langle \alpha\beta|V|\gamma\delta\rangle_{AS}, \] show that you can write the Hartree-Fock equations as \[ \sum_{\gamma}h_{\alpha\gamma}^{HF}C_{k\gamma}=\epsilon_kC_{k\alpha}. \label{eq:newhf} \] Explain the meaning of the different terms. Set up the analytic Hartree-Fock equations for the ground state beryllium with the electrons occupying the respective 'hydrogen-like' orbitals $1s$ and $2s$. There is no spin-orbit part in the two-body Hamiltonian. \item[1c)] As basis functions for our calculations we will use hydrogen-like single-particle functions. In the computations you will need to program the Coulomb interaction with matrix elements involving single-particle wave functions with $l=0$ only, so-called $s$-waves. We need only the radial part since the spherical harmonics for the $s$-waves are rather simple. Our radial wave functions are \[ R_{n0}(r)=\left(\frac{2Z}{n}\right)^{3/2}\sqrt{\frac{(n-1)!}{2n\times n!}}L_{n-1}^1(\frac{2Zr}{n})\exp{(-\frac{Zr}{n})}, \] with energies $-Z^2/2n^2$. A function for computing the generalized Laguerre polynomials $L_{n-1}^1(\frac{2Zr}{n})$ is provided at the webpage of the course under the link of project 2. We will use these functions to solve the Hartree-Fock problem for beryllium. Show that you can simplify the direct term developed during the lectures \[ \int r_1^2dr_1 \int r_2^2dr_2R_{n_{\alpha}0}^*(r_1) R_{n_{\beta}0}^*(r_2) \frac{1}{(r_>)}R_{n_{\gamma}0}(r_1)R_{n_{\delta}0}(r_2) \] as \[ \int_0^{\infty} r_1^2dr_1R_{n_{\alpha}0}^*(r_1)R_{n_{\gamma}0}(r_1) \left[\frac{1}{(r_1)}\int_0^{r_1} r_2^2dr_2 R_{n_{\beta}0}^*(r_2) R_{n_{\delta}0}(r_2)+\int_{r_1}^{\infty} r_2dr_2 R_{n_{\beta}0}^*(r_2) R_{n_{\delta}0}(r_2)\right]. \] Find the corresponding expression for the exchange term. \item[1d)] With the above ingredients we are now ready to solve the Hartree-Fock equations for the beryllium atom. Write a program which solves the Hartree-Fock equations for beryllium. You will need methods to find eigenvalues (see chapter 12 of lecture notes) and gaussian quadrature (chapter 7) to compute the integrals of the Coulomb interaction. Use as input for the first iteration the hydrogen-like single-particle wave function. Compare the results (make a plot of the $1s$ and the $2s$ functions) when self-consistency has been achieved with those obtained using the hydrogen-like wave functions only (first iteration). Parameterize thereafter your results in terms of the following Slater-type orbitals (STO) \[ R^{\mathrm{STO}}_{10}(r)=N_{10}\exp{(-\alpha_{10}r)} \] and \[ R^{\mathrm{STO}}_{20}(r)=N_{20}r\exp{(-\alpha_{20}r/2)} \] Find the coefficients $\alpha_{10}$ and $\alpha_{20}$ which reproduce best the Hartree-Fock solutions. These functions are then used in your new VMC calculations. \item[(1e)] We will now use the obtained STO single-particle wave functions to define an optimized Slater determinant for the variational Monte Carlo calculation. This means that you will not vary the parameter $\alpha$, as done in project 1. You will use the single-particle functions obtained from the Hartree-Fock calculations. Perform VMC calculations with blocking, importance sampling and the conjugate gradient method for beryllium using the following three approximations to the correlation function \[ J_1= \prod_{i