\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 1, Variational Monte Carlo studies of light atoms, deadline  april 2  12am (midnight)}

The aim of this project is to use the Variational Monte
Carlo (VMC) method and evaluate 
the ground state energy of  the atoms 
Helium, Beryllium and Neon.  The VMC calculation of Neon is optional.


\section*{Exercise 1: Hartree-Fock and Variational Monte Carlo calculations of the Helium atom}

We label $r_1$ the distance from electron 1 to the nucleus and similarly 
$r_2$ the distance between electron 2 and the nucleus.
The contribution to the potential energy from the interactions between the 
electrons and the nucleus is
\be
   -\frac{2}{r_1}-\frac{2}{r_2},
\ee 
and if we add the electron-electron repulsion with
$r_{12}=|{\bf r}_1-{\bf r}_2|$, the total potential energy 
$V(r_1, r_2)$ is
\be
 V(r_1, r_2)=-\frac{2}{r_1}-\frac{2}{r_2}+
               \frac{1}{r_{12}},
\ee
yielding the total Hamiltonian
\be
   \OP{H}=-\frac{\nabla_1^2}{2}-\frac{\nabla_2^2}{2}
          -\frac{2}{r_1}-\frac{2}{r_2}+
               \frac{1}{r_{12}},
\ee
and Schr\"odinger's equation reads
\be
   \OP{H}\psi=E\psi.
\ee
All equations are in so-called atomic units. The distances
$r_i$ and $r_{12}$ are dimensionless. To have energies in electronvolt
you need to multiply all results with 
$2\times E_0$,
where $E_0=13.6$ eV.
The experimental binding energy for helium in atomic units a.u. is $E_{\mathrm{He}}=-2.9037$ a.u..


\begin{enumerate}
\item[1a)] Set up the Hartree-Fock equations for the ground state of the Helium atom with two electrons occupying
the hydrogen-like orbitals with quantum numbers $n=1$, $s=1/2$ and $l=0$.  There is no spin-orbit part in the two-body Hamiltonian.
{\bf Make sure to write these equations using atomic units}.  

\item[1b)] Write a program which solves the Hartree-Fock equations  for the Helium atom.  Use as input for the first 
iteration the hydrogen-like single-particle wave function, with analytical shape  $\sim \exp{\left(-\alpha r_i\right)}$
where $r_i$ represents the coordinates of electron $i$. The details of all equations which you need to program will be discussed
during the lectures. Compare the results with those obtained using the hydrogen-like wave functions only.

\item[1c)]  Our next step is to perform  a Variational Monte Carlo calculation of the ground state of the helium atom.
In our first attempt we will use a brute force Metropolis sampling with a trial wave function which has the following form
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_{12}}) = 
   \exp{\left(-\alpha(r_1+r_2)\right)}
   \exp{\left(\frac{r_{12}}{2(1+\beta r_{12})}\right)}, 
\label{eq:trial}
\end{equation}
with $\alpha$ and $\beta$ as variational parameters.

Your task is to perform a Variational Monte Carlo calculation
using the Metropolis algorithm to compute the integral
\begin{equation}
   \langle E \rangle =
   \frac{\int d{\bf r_1}d{\bf r_2}\psi^{\ast}_T({\bf r_1},{\bf r_2}, {\bf r_{12}})\OP{H}({\bf r_1},{\bf r_2}, {\bf r_{12}})\psi_T({\bf r_1},{\bf r_2}, {\bf r_{12}})}
        {\int d{\bf r_1}d{\bf r_2}\psi^{\ast}_T({\bf r_1},{\bf r_2}, {\bf r_{12}})\psi_T({\bf r_1},{\bf r_2}, {\bf r_{12}})}.
\end{equation}
In performing the Monte Carlo analysis you should use blocking as a technique  to make the statistical analysis of the numerical data.
The code has to run in parallel. A code for doing a VMC calculation for the Helium atom can be 
found on the webpage of the course, see under programs.


\item[1d)]  Repeat the last step but use now  importance sampling.   Study the dependence of the results as function of the time step
$\delta t$.



\item[(1e)] Our final step is to replace the hydrogen-like orbits  in Eq.~(\ref{eq:trial}) with those obtained
from 1b)  by solving the Hartree-Fock equations.   This leads us to only one variational parameter, $\beta$. 
The calculations should include  parallelization, blocking and importance sampling.  There is no need to do brute
force Metropolis sampling. 

Compare the results with those from 1c) and the Hartree-Fock
results from 1b).  How important is the correlation part? 


\end{enumerate}


\section*{Exercise 2: Hartree-Fock and Variational Monte Carlo calculations of the Beryllium and  Neon atoms}
The previous exercise has prepared you for extending your calculational machinery  to other systems.
Here we will focus on the Neon and Beryllium atoms.
It is convenient to make modules or classes of trial wave functions, both many-body wave functions
and single-particle wave functions  and the quantum numbers  involved,such as spin, orbital momentum and principal
quantum numbers.

The new item you need to pay attention to is the calculation of the Slater Determinant. This is an additional complication
to your VMC calculations.
If we stick to hydrogen-like wave functions,
the trial wave function for Beryllium can be written as 
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_3}, {\bf r_4}) = 
   Det\left(\phi_{1}({\bf r_1}),\phi_{2}({\bf r_2}),
   \phi_{3}({\bf r_3}),\phi_{4}({\bf r_4})\right)
   \prod_{i<j}^{4}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
where the $Det$ is a Slater determinant and the single-particle wave functions
are the hydrogen wave functions for the $1s$ and $2s$ orbitals. Their form
within the variational ansatz are given by
\begin{equation}
\phi_{1s}({\bf r_i}) = e^{-\alpha r_i},
\end{equation}
and 
\begin{equation}
\phi_{2s}({\bf r_i}) = \left(1-\alpha r_i/2\right)e^{-\alpha r_i/2}.
\end{equation}
For Neon , the trial wave function can take the form
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, \dots,{\bf r_{10}}) = 
   Det\left(\phi_{1}({\bf r_1}),\phi_{2}({\bf r_2}),
   \dots,\phi_{10}({\bf r_{10}})\right)
   \prod_{i<j}^{10}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
In this case you need to include the $2p$ wave function as well.
It is given as
\begin{equation} 
\phi_{2p}({\bf r_i}) = \alpha {\bf r_i}e^{-\alpha r_i/2}.
\end{equation}
Observe that $r_i = \sqrt{r_{i_x}^2+r_{i_y}^2+r_{i_z}^2}$.

You will use the single-particle functions obtained from the Hartree-Fock calculations and will therefore not need to perform
a variational calculation with the parameter $\alpha$.


\begin{enumerate}
\item[2a)] Set up the Hartree-Fock equations for the ground state of the Beryllium and Neon atoms with four and ten  electrons, respectively,
 occupying
the respective hydrogen-like orbitals.  There is no spin-orbit part in the two-body Hamiltonian.
Find also the experimental ground state energies using atomic units.

\item[2b)] Solve the Hartree-Fock equations  for the Beryllium and Neon atoms.  
Use again as input for the first 
iteration the hydrogen-like single-particle wave function.
Compare the results with those obtained using the hydrogen-like wave functions only (first iteration).


\item[(2c)]   Write a function which sets up the Slater determinant for Beryllium. Neon is optional. 
Use the Hartree-Fock single-particle wave functions to set up the Slater determinant.
You have only one variational parameter, $\beta$.
Compute the ground state energies of Neon (optional) and Beryllium as you did for the Helium atom
in 1e). 
The calculations should include  parallelization, blocking and importance sampling.  Compare the results with the Hartree-Fock
results from 2b).  How important is the correlation part?  Is there a difference compared with Helium?   
Comment your results.

\end{enumerate}





















\section*{Literature}
\begin{enumerate}
\item B.~L.~Hammond, W.~A.~Lester and P.~J.~Reynolds, Monte Carlo methods
in Ab Inition Quantum Chemistry, World Scientific, Singapore, 1994, chapters
2-5 and appendix B.

\item J.~M~Thissjen, Computational Physics, Cambridge, 1999, chapter 4-6.

\item B.H.~Bransden and C.J.~Joachain, Physics of Atoms and molecules,
Longman, 1986. Chapters 6, 7 and 9.
\item S.A.~Alexander and R.L.~Coldwell,
Int.~Journal of Quantum Chemistry, {\bf 63} (1997) 1001.  This article is available 
at the webpage of the course as the file jastrow.pdf under the slides link.
\item C.J.~Umrigar, K.G.~Wilson and J.W.~Wilkins, Phys.~Rev.~Lett.~{\bf 60}
(1988) 1719. 



\end{enumerate}


\end{document}



