\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.
\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 allowed as programming
languages for the handins, but you can use them to check your results where possible.
The following prescription should be followed when preparing the report:
\begin{itemize}
\item Use Classfronter to hand in your projects, log in  at 
blyant.uio.no and choose 'fellesrom fys3150 og fys4150'.
Thereafter you will see an icon to the left with 'hand in' or 'innlevering'.
Click on that icon and go to the given project. 
There you can load up the files within the deadline.
\item Upload {\bf only} the report file and the source code file(s) you have developed.
The report file should include all of your discussions and a list of the codes you have developed. 
Do not include library files which are available at the course homepage, unless you have
made specific changes to them.
\item Comments  from us on your projects, approval or not, corrections to be made 
etc can be found under
your Classfronter domain and are only visible to you and the teachers of the course.

\end{itemize}
Finally, 
we do prefer that you work two and two together. Optimal working groups consist of 
2-3 students. You can then hand in a common report. 

\section*{Project 4, Variational Monte Carlo studies of light atoms, deadline  12 november  12am (midnight)}
For this project you can build upon program programs/chapter11/program1.cpp (or the f90 version).
You will need to parallelize exercises b-e and you should therefore use parts of project 2. 


The aim of this project is to investigate the variational Monte Carlo method applied
to light atoms such as helium and litium.
Various trial wave functions are to be tested and compared.
The aim is to find wave functions which reproduce the experimental 
energies as best as possible. 
  
\subsection*{Ground state energy of helium}

Helium consists of two electrons and a nucleus with charge
$Z=2$. We are going to use the Born-Oppenheimer approximation in modelling the system, 
assuming thereby that we can neglect nucleonic degrees of freedom. 
The nucleus, whose extension is on the order of $\sim 10^{-15}$ m
(roughly six order of magnitude smaller than interatomic distances), is taken to be a point charge with mass
much larger than that of the electrons.
Electrostatic forces constitute then the essential contribution to the potential energy,
given in this case by the attraction experienced by every electron from the nucleus
and the repulsion between the two electrons.  

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 is 
a.u. is $E_{\mathrm{He}}=-2.9037$ a.u..
The basic wave functions we will employ in this exercise are 
\be
   \psi_{T1}({\bf r_1},{\bf r_2}, {\bf r_{12}}) = 
   \exp{\left(-\alpha(r_1+r_2)\right)}, 
\ee
and
\be
   \psi_{T2}({\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)}, 
\ee
with  $\beta$ as a new  variational parameter.
Your task is to perform a Variational Monte Carlo calculation
using the Metropolis algorithm to compute the integral
\begin{equation}
   \langle H \rangle =
   \frac{\int d{\bf R}\psi^{\ast}_T({\bf R})H({\bf R})\psi_T({\bf R})}
        {\int d{\bf R}\psi^{\ast}_T({\bf R})\psi_T({\bf R})},
\end{equation}
 with the above trial wave functions.   
\begin{enumerate}
\item[a)] Find analytic expressions for the local energy for the above 
two trial wave functions and explain shortly how these 
trial functions satisfy 
the cusp condition when $r_1\rightarrow 0$ or
$r_2\rightarrow 0$ or  $r_{12}\rightarrow 0$.  
\item[b)] Compute    
\be
   \langle H \rangle =
   \frac{\int d{\bf R}\Psi^{\ast}_T({\bf R})H({\bf R})\Psi_T({\bf R})}
        {\int d{\bf R}\Psi^{\ast}_T({\bf R})\Psi_T({\bf R})},
\ee
for the  helium atom using a variational Monte Carlo method employing
the Metropolis algorithm to sample over different states. 
You will have to calculate
 \be
  \langle H \rangle =\int P({\bf R})E_L({\bf R}) d{\bf R},
\ee
where $E_L$ is the local energy.  Here all calculations are performed with the 
trial wave function $\psi_{T1}({\bf r_1},{\bf r_2}, {\bf r_{12}})$ only.
Study the stability of your calculation as function of the number of Monte Carlo
samples and compare these results with the exact variational result
 \be
  \langle H \rangle =\alpha^2-2\alpha\left(Z-\frac{5}{16}\right).
\ee
Your Monte Carlo moves are determined by
\be
   {\bf R}' = {\bf R} +\delta \times r,
\ee
where $r$ is a random number from the uniform distribution and $\delta$
a chosen step length.
In solving this exercise you need to devise an algorithm which finds
an optimal value of $\delta$ for each variational parameter $\alpha$,
resulting in roughly $50\%$ accepted moves.

Give a physical  interpretation of the best value of $\alpha$.
Make a plot of the variance as a function of the number of Monte Carlo
cycles.  You should parallelize your code.
\item[c)] 
Use thereafter the  optimal value for  $\alpha$ as a starting point for 
computing the ground state energy of the helium atom using the trial wave functions
$\psi_{T2}({\bf r_1},{\bf r_2}, {\bf r_{12}})$. 
In this case you need to vary both $\alpha$ and $\beta$.
The strategy here is to use 
$\alpha$ from the previous exercise, [1b)] and then 
vary $\beta$ in order to find the lowest energy as function of
$\beta$. Thereafter you change 
$\alpha$ in order to see whether you find an even lower energy and so forth.

Which one of the wave functions  $\psi_{T1}({\bf r_1},{\bf r_2}, {\bf r_{12}})$ 
and  $\psi_{T2}({\bf r_1},{\bf r_2}, {\bf r_{12}})$ 
would you prefer? Give arguments for your choices.

\end{enumerate}

\subsection*{Excited states of the helium atom and the ground state of the litium atom}
Now  we will only use trial wave functions of the form
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}) = 
   Det\left(\phi_{1}({\bf r_1}),\phi_{2}({\bf r_2})\right)
   \prod_{i<j}^{2}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
for helium and
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_3}) = 
   Det\left(\phi_{1}({\bf r_1}),\phi_{2}({\bf r_2}),
   \phi_{3}({\bf r_3})\right)
   \prod_{i<j}^{3}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
for litium
where $Det$ is a determinant and the single-particle wave functions
are the hydrogen wave functions for the $1s$ and $2s$ orbitals. Their form
within the variational ansatz is given by
\begin{equation}
\phi_{1s}({\bf r_i}) = e^{-\alpha r_i},
\end{equation}
and 
\begin{equation}
\phi_{2s}({\bf r_i}) = \left(2-\alpha r_i\right)e^{-\alpha r_i/2}.
\end{equation}
The variational parameters are still
$\alpha$ and $\beta$ only.
Observe that $r_i = \sqrt{r_{i_x}^2+r_{i_y}^2+r_{i_z}^2}$.  
Here you will need to employ the best optimization result  from the previous exercise, that
is the results from exercise [c)].
The experimental binding energy for litium is
$E_{\mathrm{Li}}=-7.4781$ a.u.~while the two first excited states of helium have energies
of $-2.1752$ a.u.~and $-2.1460$. 

\begin{enumerate}
\item[d)] The first two excited states of the helium atom can be thought of,
within a single-particle picture, as consisting of an electron in the $1s$ orbital and
one in the $2s$ orbital. There are two possibilities for the total trial wave function
\begin{equation}
   \psi_{Tas}({\bf r_1},{\bf r_2}) = 
   \left(\phi_{1s}({\bf r_1})\phi_{2s}({\bf r_2})-\phi_{1s}({\bf r_2})\phi_{2s}({\bf r_1})\right)
   \prod_{i<j}^{2}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
where the subscript $as$ stands for antisymmetric and  
\begin{equation}
   \psi_{Ts}({\bf r_1},{\bf r_2}) = 
   \left(\phi_{1s}({\bf r_1})\phi_{2s}({\bf r_2})+\phi_{1s}({\bf r_2})\phi_{2s}({\bf r_1})\right)
   \prod_{i<j}^{2}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}, 
\end{equation}
where $s$ means symmetric. You can think of  ${\bf r_1}$ and ${\bf r_2}$ as the positions of electrons 
1 and 2, respectively. 
Which wave function do you expect to give the lowest energy (most bound)?
Perform a variational Monte Carlo calculation and see if your arguments are correct. Compare your results
with the experimental values.   
\item[e)] For litium we assume that a possible trial wave function for the ground state is given by
\begin{eqnarray}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_3})& =& 
   \left(\phi_{1s}({\bf r_1})\phi_{2s}({\bf r_2})-\phi_{1s}({\bf r_2})\phi_{2s}({\bf r_1})\right)\phi_{1s}({\bf r_3})\nonumber \\
  & \times& 
\prod_{i<j}^{3}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)}. 
\end{eqnarray}
Compute the ground state energy and compare with experiment. Comment your results. 

\end{enumerate}


\end{document}








