Skip to content

Latest commit

 

History

History
97 lines (76 loc) · 3.95 KB

Project.org

File metadata and controls

97 lines (76 loc) · 3.95 KB

Project: Quantum Monte Carlo

In the lab session, you have implemented a Variational Monte Carlo (VMC) program to compute the ground state energy of the Hydrogen atom. Then, I presented how you can modify it into a pure diffusion Monte Carlo (PDMC) program

We recall the algorithm here:

  1. Start with $W(\mathbf{r}_0)=1, τ_0 = 0$
  2. Evaluate the local energy at $\mathbf{r}n$
  3. Compute the contribution to the weight $w(\mathbf{r}_n) = exp(-δ t(E_L(\mathbf{r}_n)-E_\text{ref}))$
  4. Update $W(\mathbf{r}n) = W(\mathbf{r}n-1) × w(\mathbf{r}_n)$
  5. Accumulate the weighted energy $W(\mathbf{r}_n) × E_L(\mathbf{r}_n)$, and the weight $W(\mathbf{r}_n)$ for the normalization
  6. Update $τ_n = τn-1 + δ t$
  7. If $τn > τ_\text{max}$ ($τ_\text{max}$ is an input parameter), the long projection time has been reached and we can start an new trajectory from the current position: reset $W(r_n) = 1$ and $τ_n = 0$
  8. Compute a new position $\mathbf{r’} = \mathbf{r}_n + δ t\, \frac{∇ Ψ(\mathbf{r})}{Ψ(\mathbf{r})} + χ$
  9. Evaluate $Ψ(\mathbf{r}’)$ and $\frac{∇ Ψ(\mathbf{r’})}{Ψ(\mathbf{r’})}$ at the new position
  10. Compute the ratio $A = \frac{T(\mathbf{r}’ → \mathbf{r}n) P(\mathbf{r}’)}{T(\mathbf{r}n → \mathbf{r}’) P(\mathbf{r}n)}$
  1. Draw a uniform random number $v ∈ [0,1]$
  2. if $v ≤ A$, accept the move : set $\mathbf{r}n+1 = \mathbf{r’}$
  3. else, reject the move : set $\mathbf{r}n+1 = \mathbf{r}_n$

In this project, you will generalize the QMC code so that you can run calculations for more than one electron and more than one nucleus. You code will allow to perform a VMC run or a PDMC, depending on a keyword given as input.

The parameters of the wave function (nuclear coordinates, exponents, etc), and the parameters of the simulation (time step, number of Monte Carlo steps, VMC or PDMC, etc) will have to be read from an input file, in such a way that the same program will be able to compute the ground state energy of

  • the Hydrogen atom
  • the Helium atom
  • the H2+ ion at $R$ = 0.7 Angstrom
  • the H2 molecule at $R$ = 0.7 Angstrom
  • the H3+ ion at the following geometry (Angstrom):
    H    -0.049222     0.000000    -0.085255
    H    -0.049222     0.000000     0.785255
    H     0.704662     0.000000     0.350000
        

Hint: Don’t forget to convert the coordinates from Angstrom to atomic units.

Hint: Remark that the only difference in the VMC and a PDMC algorithms is the introduction of the weight at step 2.

The website https://trex-coe.github.io/qmc-lttc-2023 is always accessible, and the solutions to the all exercises are available.