mirror of
https://github.com/TREX-CoE/qmc-lttc.git
synced 2024-12-22 04:15:01 +01:00
deploy: 76adcbddf2
This commit is contained in:
parent
75bb82fc63
commit
3e927385a6
544
index.html
544
index.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-01-30 Sat 12:21 -->
|
||||
<!-- 2021-01-30 Sat 21:41 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Quantum Monte Carlo</title>
|
||||
@ -329,148 +329,147 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org8dcaa4e">1. Introduction</a></li>
|
||||
<li><a href="#orgf2d601e">2. Numerical evaluation of the energy</a>
|
||||
<li><a href="#org0ddeb79">1. Introduction</a>
|
||||
<ul>
|
||||
<li><a href="#org0b86853">2.1. Local energy</a>
|
||||
<li><a href="#org6f0b456">1.1. Local energy</a>
|
||||
<ul>
|
||||
<li><a href="#orgb4f1dcb">2.1.1. Exercise 1</a>
|
||||
<li><a href="#org78005c6">1.1.1. Exercise 1</a>
|
||||
<ul>
|
||||
<li><a href="#orge1171f3">2.1.1.1. Solution</a></li>
|
||||
<li><a href="#org69e8d62">1.1.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org805f102">2.1.2. Exercise 2</a>
|
||||
<li><a href="#orgeb36ece">1.1.2. Exercise 2</a>
|
||||
<ul>
|
||||
<li><a href="#orge839f82">2.1.2.1. Solution</a></li>
|
||||
<li><a href="#orgad4cf40">1.1.2.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org30a89b7">2.1.3. Exercise 3</a>
|
||||
<li><a href="#orgde512b1">1.1.3. Exercise 3</a>
|
||||
<ul>
|
||||
<li><a href="#org37f3a90">2.1.3.1. Solution</a></li>
|
||||
<li><a href="#org3c2172c">1.1.3.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org8a71cb9">2.1.4. Exercise 4</a>
|
||||
<li><a href="#org81e2a70">1.1.4. Exercise 4</a>
|
||||
<ul>
|
||||
<li><a href="#org3127c46">2.1.4.1. Solution</a></li>
|
||||
<li><a href="#orgfc45098">1.1.4.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org5ae05ca">2.1.5. Exercise 5</a>
|
||||
<li><a href="#org6d8d5bf">1.1.5. Exercise 5</a>
|
||||
<ul>
|
||||
<li><a href="#orgde68619">2.1.5.1. Solution</a></li>
|
||||
<li><a href="#org29c7bdc">1.1.5.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6b6a61c">2.2. Plot of the local energy along the \(x\) axis</a>
|
||||
<li><a href="#org8a94425">1.2. Plot of the local energy along the \(x\) axis</a>
|
||||
<ul>
|
||||
<li><a href="#orga530380">2.2.1. Exercise</a>
|
||||
<li><a href="#org6f8bb22">1.2.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#orgcd9f1bf">2.2.1.1. Solution</a></li>
|
||||
<li><a href="#orgde055e6">1.2.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org2387d29">2.3. Numerical estimation of the energy</a>
|
||||
<li><a href="#org1a0dc00">1.3. Numerical estimation of the energy</a>
|
||||
<ul>
|
||||
<li><a href="#orgde278da">2.3.1. Exercise</a>
|
||||
<li><a href="#org8e504ef">1.3.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#org73954f7">2.3.1.1. Solution</a></li>
|
||||
<li><a href="#orgae9b7e6">1.3.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgd0c5f25">2.4. Variance of the local energy</a>
|
||||
<li><a href="#org18a28d8">1.4. Variance of the local energy</a>
|
||||
<ul>
|
||||
<li><a href="#orgdd8878b">2.4.1. Exercise (optional)</a>
|
||||
<li><a href="#org1e571a6">1.4.1. Exercise (optional)</a>
|
||||
<ul>
|
||||
<li><a href="#org874aece">2.4.1.1. Solution</a></li>
|
||||
<li><a href="#orga8d0d0c">1.4.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org55c03ac">2.4.2. Exercise</a>
|
||||
<li><a href="#org8e32fec">1.4.2. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#orgff8da50">2.4.2.1. Solution</a></li>
|
||||
<li><a href="#org8c29b0e">1.4.2.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org500fc9e">3. Variational Monte Carlo</a>
|
||||
<li><a href="#orgad22bd9">2. Variational Monte Carlo</a>
|
||||
<ul>
|
||||
<li><a href="#org1395f72">3.1. Computation of the statistical error</a>
|
||||
<li><a href="#orgf4230ee">2.1. Computation of the statistical error</a>
|
||||
<ul>
|
||||
<li><a href="#orgbf3b7c1">3.1.1. Exercise</a>
|
||||
<li><a href="#org0a476b8">2.1.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#org96a3dcd">3.1.1.1. Solution</a></li>
|
||||
<li><a href="#org22fa572">2.1.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6f903d5">3.2. Uniform sampling in the box</a>
|
||||
<li><a href="#org51ecf49">2.2. Uniform sampling in the box</a>
|
||||
<ul>
|
||||
<li><a href="#orgd5d2e4f">3.2.1. Exercise</a>
|
||||
<li><a href="#org8683a22">2.2.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#orge0a3bca">3.2.1.1. Solution</a></li>
|
||||
<li><a href="#org580c059">2.2.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org31acf84">3.3. Metropolis sampling with \(\Psi^2\)</a>
|
||||
<li><a href="#org0ce09e0">2.3. Metropolis sampling with \(\Psi^2\)</a>
|
||||
<ul>
|
||||
<li><a href="#org6d54039">3.3.1. Exercise</a>
|
||||
<li><a href="#org5cdc0da">2.3.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#org8084209">3.3.1.1. Solution</a></li>
|
||||
<li><a href="#orgb3affe7">2.3.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org92d024f">3.4. Gaussian random number generator</a></li>
|
||||
<li><a href="#org1a64e1d">3.5. Generalized Metropolis algorithm</a>
|
||||
<li><a href="#org1d0503e">2.4. Gaussian random number generator</a></li>
|
||||
<li><a href="#org3c33d0c">2.5. Generalized Metropolis algorithm</a>
|
||||
<ul>
|
||||
<li><a href="#org97c1b29">3.5.1. Exercise 1</a>
|
||||
<li><a href="#orgdcf7766">2.5.1. Exercise 1</a>
|
||||
<ul>
|
||||
<li><a href="#org19e85c9">3.5.1.1. Solution</a></li>
|
||||
<li><a href="#org0468289">2.5.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgaef93b5">3.5.2. Exercise 2</a>
|
||||
<li><a href="#orgf25990d">2.5.2. Exercise 2</a>
|
||||
<ul>
|
||||
<li><a href="#org17fe7c6">3.5.2.1. Solution</a></li>
|
||||
<li><a href="#org1b40299">2.5.2.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9f51d1e">4. Diffusion Monte Carlo</a>
|
||||
<li><a href="#org7159b49">3. Diffusion Monte Carlo</a>
|
||||
<ul>
|
||||
<li><a href="#org344d9de">4.1. Schrödinger equation in imaginary time</a></li>
|
||||
<li><a href="#org06862e7">4.2. Diffusion and branching</a></li>
|
||||
<li><a href="#orgdf62087">4.3. Importance sampling</a>
|
||||
<li><a href="#org851f123">3.1. Schrödinger equation in imaginary time</a></li>
|
||||
<li><a href="#orgb662256">3.2. Diffusion and branching</a></li>
|
||||
<li><a href="#org0ed0c07">3.3. Importance sampling</a>
|
||||
<ul>
|
||||
<li><a href="#org855e049">4.3.1. Appendix : Details of the Derivation</a></li>
|
||||
<li><a href="#org5a760ca">3.3.1. Appendix : Details of the Derivation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6fbf6b7">4.4. Fixed-node DMC energy</a></li>
|
||||
<li><a href="#org4379250">4.5. Pure Diffusion Monte Carlo (PDMC)</a></li>
|
||||
<li><a href="#org3a30f06">4.6. Hydrogen atom</a>
|
||||
<li><a href="#orgf9fe967">3.4. Fixed-node DMC energy</a></li>
|
||||
<li><a href="#orgbd478f8">3.5. Pure Diffusion Monte Carlo (PDMC)</a></li>
|
||||
<li><a href="#org2828b37">3.6. Hydrogen atom</a>
|
||||
<ul>
|
||||
<li><a href="#orgba6aa2f">4.6.1. Exercise</a>
|
||||
<li><a href="#orge0e4678">3.6.1. Exercise</a>
|
||||
<ul>
|
||||
<li><a href="#org2311033">4.6.1.1. Solution</a></li>
|
||||
<li><a href="#org14a27f3">3.6.1.1. Solution</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org81121c2">4.7. <span class="todo TODO">TODO</span> H<sub>2</sub></a></li>
|
||||
<li><a href="#orge51396e">3.7. <span class="todo TODO">TODO</span> H<sub>2</sub></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf5ad8c9">5. <span class="todo TODO">TODO</span> <code>[0/3]</code> Last things to do</a></li>
|
||||
<li><a href="#org6c71552">4. <span class="todo TODO">TODO</span> <code>[0/3]</code> Last things to do</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8dcaa4e" class="outline-2">
|
||||
<h2 id="org8dcaa4e"><span class="section-number-2">1</span> Introduction</h2>
|
||||
<div id="outline-container-org0ddeb79" class="outline-2">
|
||||
<h2 id="org0ddeb79"><span class="section-number-2">1</span> Introduction</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
This website contains the QMC tutorial of the 2021 LTTC winter school
|
||||
@ -508,12 +507,88 @@ is defined everywhere, continuous, and infinitely differentiable.
|
||||
All the quantities are expressed in <i>atomic units</i> (energies,
|
||||
coordinates, etc).
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf2d601e" class="outline-2">
|
||||
<h2 id="orgf2d601e"><span class="section-number-2">2</span> Numerical evaluation of the energy</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
** Energy and local energy
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For a given system with Hamiltonian \(\hat{H}\) and wave function \(\Psi\), we define the local energy as
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[
|
||||
E_L(\mathbf{r}) = \frac{\hat{H} \Psi(\mathbf{r})}{\Psi(\mathbf{r})},
|
||||
\]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
where \(\mathbf{r}\) denotes the 3N-dimensional electronic coordinates.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The electronic energy of a system, \(E\), can be rewritten in terms of the
|
||||
local energy \(E_L(\mathbf{r})\) as
|
||||
</p>
|
||||
|
||||
\begin{eqnarray*}
|
||||
E & = & \frac{\langle \Psi| \hat{H} | \Psi\rangle}{\langle \Psi |\Psi \rangle}
|
||||
= \frac{\int \Psi(\mathbf{r})\, \hat{H} \Psi(\mathbf{r})\, d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}} \\
|
||||
& = & \frac{\int \left[\Psi(\mathbf{r})\right]^2\, \frac{\hat{H} \Psi(\mathbf{r})}{\Psi(\mathbf{r})}\,d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}}
|
||||
= \frac{\int \left[\Psi(\mathbf{r})\right]^2\, E_L(\mathbf{r})\,d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}}
|
||||
\end{eqnarray*}
|
||||
|
||||
<p>
|
||||
For few dimensions, one can easily compute \(E\) by evaluating the integrals on a grid but, for a high number of dimensions, one can resort to Monte Carlo techniques to compute \(E\).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To this aim, recall that the probabilistic <i>expected value</i> of an arbitrary function \(f(x)\)
|
||||
with respect to a probability density function \(p(x)\) is given by
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ \langle f \rangle_p = \int_{-\infty}^\infty p(x)\, f(x)\,dx, \]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
where a probability density function \(p(x)\) is non-negative
|
||||
and integrates to one:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ \int_{-\infty}^\infty p(x)\,dx = 1. \]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Similarly, we can view the the energy of a system, \(E\), as the expected value of the local energy with respect to
|
||||
a probability density \(p(\mathbf{r}}\) defined in 3\(N\) dimensions:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ E = \int E_L(\mathbf{r}) p(\mathbf{r})\,d\mathbf{r}} \equiv \langle E_L \rangle_{\Psi^2}\,, \]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
where the probability density is given by the square of the wave function:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ p(\mathbf{r}) = \frac{|Psi(\mathbf{r}|^2){\int \left |\Psi(\mathbf{r})|^2 d\mathbf{r}}\,. \]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If we can sample configurations \(\{\mathbf{r}\}\) distributed as \(p\), we can estimate \(E\) as the average of the local energy computed over these configurations:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
$$ E ≈ \frac{1}{M} ∑<sub>i=1</sub><sup>M</sup> E<sub>L</sub>(\mathbf{r}<sub>i</sub>} \,.
|
||||
</p>
|
||||
|
||||
<ul class="org-ul">
|
||||
<li>Numerical evaluation of the energy of the hydrogen atoms</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
In this section, we consider the hydrogen atom with the following
|
||||
wave function:
|
||||
@ -540,62 +615,15 @@ eigenfunction of the Hamiltonian
|
||||
To do that, we will compute the local energy, defined as
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[
|
||||
E_L(\mathbf{r}) = \frac{\hat{H} \Psi(\mathbf{r})}{\Psi(\mathbf{r})},
|
||||
\]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
and check whether it is constant.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In general, the electronic energy of a system, \(E\), can be rewritten as the expectation value of the
|
||||
local energy \(E(\mathbf{r})\) with respect to the 3N-dimensional
|
||||
electron density given by the square of the wave function:
|
||||
</p>
|
||||
|
||||
\begin{eqnarray*}
|
||||
E & = & \frac{\langle \Psi| \hat{H} | \Psi\rangle}{\langle \Psi |\Psi \rangle}
|
||||
= \frac{\int \Psi(\mathbf{r})\, \hat{H} \Psi(\mathbf{r})\, d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}} \\
|
||||
& = & \frac{\int \left[\Psi(\mathbf{r})\right]^2\, \frac{\hat{H} \Psi(\mathbf{r})}{\Psi(\mathbf{r})}\,d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}}
|
||||
= \frac{\int \left[\Psi(\mathbf{r})\right]^2\, E_L(\mathbf{r})\,d\mathbf{r}}{\int \left[\Psi(\mathbf{r}) \right]^2 d\mathbf{r}}
|
||||
= \langle E_L \rangle_{\Psi^2}\,,
|
||||
\end{eqnarray*}
|
||||
<p>
|
||||
where \(\mathbf{r}\) is the vector of the 3N-dimensional electronic coordinates (\(N=1\) for the hydrogen atom).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For a small number of dimensions, one can compute \(E\) by evaluating the integrals on a grid. However,
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The probabilistic <i>expected value</i> of an arbitrary function \(f(x)\)
|
||||
with respect to a probability density function \(p(x)\) is given by
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ \langle f \rangle_p = \int_{-\infty}^\infty p(x)\, f(x)\,dx, \]
|
||||
</p>
|
||||
|
||||
<p>
|
||||
where probability density function \(p(x)\) is non-negative
|
||||
and integrates to one:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[ \int_{-\infty}^\infty p(x)\,dx = 1. \]
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="outline-container-org0b86853" class="outline-3">
|
||||
<h3 id="org0b86853"><span class="section-number-3">2.1</span> Local energy</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<div id="outline-container-org6f0b456" class="outline-3">
|
||||
<h3 id="org6f0b456"><span class="section-number-3">1.1</span> Local energy</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
Write all the functions of this section in a single file :
|
||||
<code>hydrogen.py</code> if you use Python, or <code>hydrogen.f90</code> is you use
|
||||
@ -617,9 +645,9 @@ to catch the error.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb4f1dcb" class="outline-4">
|
||||
<h4 id="orgb4f1dcb"><span class="section-number-4">2.1.1</span> Exercise 1</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<div id="outline-container-org78005c6" class="outline-4">
|
||||
<h4 id="org78005c6"><span class="section-number-4">1.1.1</span> Exercise 1</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function which computes the potential at \(\mathbf{r}\).
|
||||
@ -662,9 +690,9 @@ and returns the potential.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge1171f3" class="outline-5">
|
||||
<h5 id="orge1171f3"><span class="section-number-5">2.1.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-1">
|
||||
<div id="outline-container-org69e8d62" class="outline-5">
|
||||
<h5 id="org69e8d62"><span class="section-number-5">1.1.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-1-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -703,9 +731,9 @@ and returns the potential.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org805f102" class="outline-4">
|
||||
<h4 id="org805f102"><span class="section-number-4">2.1.2</span> Exercise 2</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<div id="outline-container-orgeb36ece" class="outline-4">
|
||||
<h4 id="orgeb36ece"><span class="section-number-4">1.1.2</span> Exercise 2</h4>
|
||||
<div class="outline-text-4" id="text-1-1-2">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function which computes the wave function at \(\mathbf{r}\).
|
||||
@ -739,9 +767,9 @@ input arguments, and returns a scalar.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge839f82" class="outline-5">
|
||||
<h5 id="orge839f82"><span class="section-number-5">2.1.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-2-1">
|
||||
<div id="outline-container-orgad4cf40" class="outline-5">
|
||||
<h5 id="orgad4cf40"><span class="section-number-5">1.1.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-1-2-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -767,9 +795,9 @@ input arguments, and returns a scalar.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org30a89b7" class="outline-4">
|
||||
<h4 id="org30a89b7"><span class="section-number-4">2.1.3</span> Exercise 3</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div id="outline-container-orgde512b1" class="outline-4">
|
||||
<h4 id="orgde512b1"><span class="section-number-4">1.1.3</span> Exercise 3</h4>
|
||||
<div class="outline-text-4" id="text-1-1-3">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function which computes the local kinetic energy at \(\mathbf{r}\).
|
||||
@ -849,9 +877,9 @@ So the local kinetic energy is
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org37f3a90" class="outline-5">
|
||||
<h5 id="org37f3a90"><span class="section-number-5">2.1.3.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-3-1">
|
||||
<div id="outline-container-org3c2172c" class="outline-5">
|
||||
<h5 id="org3c2172c"><span class="section-number-5">1.1.3.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-1-3-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -891,9 +919,9 @@ So the local kinetic energy is
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8a71cb9" class="outline-4">
|
||||
<h4 id="org8a71cb9"><span class="section-number-4">2.1.4</span> Exercise 4</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<div id="outline-container-org81e2a70" class="outline-4">
|
||||
<h4 id="org81e2a70"><span class="section-number-4">1.1.4</span> Exercise 4</h4>
|
||||
<div class="outline-text-4" id="text-1-1-4">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function which computes the local energy at \(\mathbf{r}\),
|
||||
@ -935,9 +963,9 @@ local kinetic energy.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3127c46" class="outline-5">
|
||||
<h5 id="org3127c46"><span class="section-number-5">2.1.4.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-4-1">
|
||||
<div id="outline-container-orgfc45098" class="outline-5">
|
||||
<h5 id="orgfc45098"><span class="section-number-5">1.1.4.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-1-4-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -966,9 +994,9 @@ local kinetic energy.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5ae05ca" class="outline-4">
|
||||
<h4 id="org5ae05ca"><span class="section-number-4">2.1.5</span> Exercise 5</h4>
|
||||
<div class="outline-text-4" id="text-2-1-5">
|
||||
<div id="outline-container-org6d8d5bf" class="outline-4">
|
||||
<h4 id="org6d8d5bf"><span class="section-number-4">1.1.5</span> Exercise 5</h4>
|
||||
<div class="outline-text-4" id="text-1-1-5">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Find the theoretical value of \(a\) for which \(\Psi\) is an eigenfunction of \(\hat{H}\).
|
||||
@ -977,9 +1005,9 @@ Find the theoretical value of \(a\) for which \(\Psi\) is an eigenfunction of \(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgde68619" class="outline-5">
|
||||
<h5 id="orgde68619"><span class="section-number-5">2.1.5.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-5-1">
|
||||
<div id="outline-container-org29c7bdc" class="outline-5">
|
||||
<h5 id="org29c7bdc"><span class="section-number-5">1.1.5.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-1-5-1">
|
||||
\begin{eqnarray*}
|
||||
E &=& \frac{\hat{H} \Psi}{\Psi} = - \frac{1}{2} \frac{\Delta \Psi}{\Psi} -
|
||||
\frac{1}{|\mathbf{r}|} \\
|
||||
@ -998,9 +1026,9 @@ equal to -0.5 atomic units.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6b6a61c" class="outline-3">
|
||||
<h3 id="org6b6a61c"><span class="section-number-3">2.2</span> Plot of the local energy along the \(x\) axis</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<div id="outline-container-org8a94425" class="outline-3">
|
||||
<h3 id="org8a94425"><span class="section-number-3">1.2</span> Plot of the local energy along the \(x\) axis</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="note">
|
||||
<p>
|
||||
The potential and the kinetic energy both diverge at \(r=0\), so we
|
||||
@ -1010,9 +1038,9 @@ choose a grid which does not contain the origin.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga530380" class="outline-4">
|
||||
<h4 id="orga530380"><span class="section-number-4">2.2.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<div id="outline-container-org6f8bb22" class="outline-4">
|
||||
<h4 id="org6f8bb22"><span class="section-number-4">1.2.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-1-2-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
For multiple values of \(a\) (0.1, 0.2, 0.5, 1., 1.5, 2.), plot the
|
||||
@ -1094,9 +1122,9 @@ plot './data' index 0 using 1:2 with lines title 'a=0.1', \
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcd9f1bf" class="outline-5">
|
||||
<h5 id="orgcd9f1bf"><span class="section-number-5">2.2.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-2-1-1">
|
||||
<div id="outline-container-orgde055e6" class="outline-5">
|
||||
<h5 id="orgde055e6"><span class="section-number-5">1.2.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-2-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -1170,9 +1198,9 @@ plt.savefig(<span style="color: #8b2252;">"plot_py.png"</span>)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2387d29" class="outline-3">
|
||||
<h3 id="org2387d29"><span class="section-number-3">2.3</span> Numerical estimation of the energy</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<div id="outline-container-org1a0dc00" class="outline-3">
|
||||
<h3 id="org1a0dc00"><span class="section-number-3">1.3</span> Numerical estimation of the energy</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
If the space is discretized in small volume elements \(\mathbf{r}_i\)
|
||||
of size \(\delta \mathbf{r}\), the expression of \(\langle E_L \rangle_{\Psi^2}\)
|
||||
@ -1201,9 +1229,9 @@ The energy is biased because:
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgde278da" class="outline-4">
|
||||
<h4 id="orgde278da"><span class="section-number-4">2.3.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-3-1">
|
||||
<div id="outline-container-org8e504ef" class="outline-4">
|
||||
<h4 id="org8e504ef"><span class="section-number-4">1.3.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-1-3-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Compute a numerical estimate of the energy in a grid of
|
||||
@ -1271,9 +1299,9 @@ To compile the Fortran and run it:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org73954f7" class="outline-5">
|
||||
<h5 id="org73954f7"><span class="section-number-5">2.3.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-3-1-1">
|
||||
<div id="outline-container-orgae9b7e6" class="outline-5">
|
||||
<h5 id="orgae9b7e6"><span class="section-number-5">1.3.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-3-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -1387,9 +1415,9 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd0c5f25" class="outline-3">
|
||||
<h3 id="orgd0c5f25"><span class="section-number-3">2.4</span> Variance of the local energy</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<div id="outline-container-org18a28d8" class="outline-3">
|
||||
<h3 id="org18a28d8"><span class="section-number-3">1.4</span> Variance of the local energy</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
The variance of the local energy is a functional of \(\Psi\)
|
||||
which measures the magnitude of the fluctuations of the local
|
||||
@ -1415,9 +1443,9 @@ energy can be used as a measure of the quality of a wave function.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdd8878b" class="outline-4">
|
||||
<h4 id="orgdd8878b"><span class="section-number-4">2.4.1</span> Exercise (optional)</h4>
|
||||
<div class="outline-text-4" id="text-2-4-1">
|
||||
<div id="outline-container-org1e571a6" class="outline-4">
|
||||
<h4 id="org1e571a6"><span class="section-number-4">1.4.1</span> Exercise (optional)</h4>
|
||||
<div class="outline-text-4" id="text-1-4-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Prove that :
|
||||
@ -1427,9 +1455,9 @@ Prove that :
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org874aece" class="outline-5">
|
||||
<h5 id="org874aece"><span class="section-number-5">2.4.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-4-1-1">
|
||||
<div id="outline-container-orga8d0d0c" class="outline-5">
|
||||
<h5 id="orga8d0d0c"><span class="section-number-5">1.4.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-4-1-1">
|
||||
<p>
|
||||
\(\bar{E} = \langle E \rangle\) is a constant, so \(\langle \bar{E}
|
||||
\rangle = \bar{E}\) .
|
||||
@ -1447,9 +1475,9 @@ Prove that :
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org55c03ac" class="outline-4">
|
||||
<h4 id="org55c03ac"><span class="section-number-4">2.4.2</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-4-2">
|
||||
<div id="outline-container-org8e32fec" class="outline-4">
|
||||
<h4 id="org8e32fec"><span class="section-number-4">1.4.2</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-1-4-2">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Add the calculation of the variance to the previous code, and
|
||||
@ -1522,9 +1550,9 @@ To compile and run:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgff8da50" class="outline-5">
|
||||
<h5 id="orgff8da50"><span class="section-number-5">2.4.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-4-2-1">
|
||||
<div id="outline-container-org8c29b0e" class="outline-5">
|
||||
<h5 id="org8c29b0e"><span class="section-number-5">1.4.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-1-4-2-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -1660,9 +1688,9 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002 s2 = 1.8068814
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org500fc9e" class="outline-2">
|
||||
<h2 id="org500fc9e"><span class="section-number-2">3</span> Variational Monte Carlo</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<div id="outline-container-orgad22bd9" class="outline-2">
|
||||
<h2 id="orgad22bd9"><span class="section-number-2">2</span> Variational Monte Carlo</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
Numerical integration with deterministic methods is very efficient
|
||||
in low dimensions. When the number of dimensions becomes large,
|
||||
@ -1677,9 +1705,9 @@ interval.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1395f72" class="outline-3">
|
||||
<h3 id="org1395f72"><span class="section-number-3">3.1</span> Computation of the statistical error</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<div id="outline-container-orgf4230ee" class="outline-3">
|
||||
<h3 id="orgf4230ee"><span class="section-number-3">2.1</span> Computation of the statistical error</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
To compute the statistical error, you need to perform \(M\)
|
||||
independent Monte Carlo calculations. You will obtain \(M\) different
|
||||
@ -1718,9 +1746,9 @@ And the confidence interval is given by
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbf3b7c1" class="outline-4">
|
||||
<h4 id="orgbf3b7c1"><span class="section-number-4">3.1.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-3-1-1">
|
||||
<div id="outline-container-org0a476b8" class="outline-4">
|
||||
<h4 id="org0a476b8"><span class="section-number-4">2.1.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function returning the average and statistical error of an
|
||||
@ -1757,9 +1785,9 @@ input array.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org96a3dcd" class="outline-5">
|
||||
<h5 id="org96a3dcd"><span class="section-number-5">3.1.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-1-1-1">
|
||||
<div id="outline-container-org22fa572" class="outline-5">
|
||||
<h5 id="org22fa572"><span class="section-number-5">2.1.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-1-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -1817,9 +1845,9 @@ input array.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6f903d5" class="outline-3">
|
||||
<h3 id="org6f903d5"><span class="section-number-3">3.2</span> Uniform sampling in the box</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<div id="outline-container-org51ecf49" class="outline-3">
|
||||
<h3 id="org51ecf49"><span class="section-number-3">2.2</span> Uniform sampling in the box</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
We will now do our first Monte Carlo calculation to compute the
|
||||
energy of the hydrogen atom.
|
||||
@ -1852,9 +1880,9 @@ compute the statistical error.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd5d2e4f" class="outline-4">
|
||||
<h4 id="orgd5d2e4f"><span class="section-number-4">3.2.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-3-2-1">
|
||||
<div id="outline-container-org8683a22" class="outline-4">
|
||||
<h4 id="org8683a22"><span class="section-number-4">2.2.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Parameterize the wave function with \(a=0.9\). Perform 30
|
||||
@ -1953,9 +1981,9 @@ well as the index of the current step.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge0a3bca" class="outline-5">
|
||||
<h5 id="orge0a3bca"><span class="section-number-5">3.2.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-2-1-1">
|
||||
<div id="outline-container-org580c059" class="outline-5">
|
||||
<h5 id="org580c059"><span class="section-number-5">2.2.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-2-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -2068,9 +2096,9 @@ E = -0.49518773675598715 +/- 5.2391494923686175E-004
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org31acf84" class="outline-3">
|
||||
<h3 id="org31acf84"><span class="section-number-3">3.3</span> Metropolis sampling with \(\Psi^2\)</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
<div id="outline-container-org0ce09e0" class="outline-3">
|
||||
<h3 id="org0ce09e0"><span class="section-number-3">2.3</span> Metropolis sampling with \(\Psi^2\)</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
We will now use the square of the wave function to sample random
|
||||
points distributed with the probability density
|
||||
@ -2157,9 +2185,9 @@ step such that the acceptance rate is close to 0.5 is a good compromise.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org6d54039" class="outline-4">
|
||||
<h4 id="org6d54039"><span class="section-number-4">3.3.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-3-3-1">
|
||||
<div id="outline-container-org5cdc0da" class="outline-4">
|
||||
<h4 id="org5cdc0da"><span class="section-number-4">2.3.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-2-3-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Modify the program of the previous section to compute the energy,
|
||||
@ -2265,9 +2293,9 @@ Can you observe a reduction in the statistical error?
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8084209" class="outline-5">
|
||||
<h5 id="org8084209"><span class="section-number-5">3.3.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-3-1-1">
|
||||
<div id="outline-container-orgb3affe7" class="outline-5">
|
||||
<h5 id="orgb3affe7"><span class="section-number-5">2.3.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-3-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -2411,9 +2439,9 @@ A = 0.51695266666666673 +/- 4.0445505648997396E-004
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org92d024f" class="outline-3">
|
||||
<h3 id="org92d024f"><span class="section-number-3">3.4</span> Gaussian random number generator</h3>
|
||||
<div class="outline-text-3" id="text-3-4">
|
||||
<div id="outline-container-org1d0503e" class="outline-3">
|
||||
<h3 id="org1d0503e"><span class="section-number-3">2.4</span> Gaussian random number generator</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
To obtain Gaussian-distributed random numbers, you can apply the
|
||||
<a href="https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform">Box Muller transform</a> to uniform random numbers:
|
||||
@ -2474,9 +2502,9 @@ In Python, you can use the <a href="https://numpy.org/doc/stable/reference/rando
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org1a64e1d" class="outline-3">
|
||||
<h3 id="org1a64e1d"><span class="section-number-3">3.5</span> Generalized Metropolis algorithm</h3>
|
||||
<div class="outline-text-3" id="text-3-5">
|
||||
<div id="outline-container-org3c33d0c" class="outline-3">
|
||||
<h3 id="org3c33d0c"><span class="section-number-3">2.5</span> Generalized Metropolis algorithm</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
One can use more efficient numerical schemes to move the electrons,
|
||||
but the Metropolis accepation step has to be adapted accordingly:
|
||||
@ -2574,9 +2602,9 @@ The transition probability becomes:
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org97c1b29" class="outline-4">
|
||||
<h4 id="org97c1b29"><span class="section-number-4">3.5.1</span> Exercise 1</h4>
|
||||
<div class="outline-text-4" id="text-3-5-1">
|
||||
<div id="outline-container-orgdcf7766" class="outline-4">
|
||||
<h4 id="orgdcf7766"><span class="section-number-4">2.5.1</span> Exercise 1</h4>
|
||||
<div class="outline-text-4" id="text-2-5-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\Psi(\mathbf{r})}\).
|
||||
@ -2609,9 +2637,9 @@ Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\P
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org19e85c9" class="outline-5">
|
||||
<h5 id="org19e85c9"><span class="section-number-5">3.5.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-5-1-1">
|
||||
<div id="outline-container-org0468289" class="outline-5">
|
||||
<h5 id="org0468289"><span class="section-number-5">2.5.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-5-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -2643,9 +2671,9 @@ Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\P
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgaef93b5" class="outline-4">
|
||||
<h4 id="orgaef93b5"><span class="section-number-4">3.5.2</span> Exercise 2</h4>
|
||||
<div class="outline-text-4" id="text-3-5-2">
|
||||
<div id="outline-container-orgf25990d" class="outline-4">
|
||||
<h4 id="orgf25990d"><span class="section-number-4">2.5.2</span> Exercise 2</h4>
|
||||
<div class="outline-text-4" id="text-2-5-2">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Modify the previous program to introduce the drifted diffusion scheme.
|
||||
@ -2738,9 +2766,9 @@ Modify the previous program to introduce the drifted diffusion scheme.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org17fe7c6" class="outline-5">
|
||||
<h5 id="org17fe7c6"><span class="section-number-5">3.5.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-5-2-1">
|
||||
<div id="outline-container-org1b40299" class="outline-5">
|
||||
<h5 id="org1b40299"><span class="section-number-5">2.5.2.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-2-5-2-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -2925,13 +2953,13 @@ A = 0.78839866666666658 +/- 3.2503783452043152E-004
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9f51d1e" class="outline-2">
|
||||
<h2 id="org9f51d1e"><span class="section-number-2">4</span> Diffusion Monte Carlo   <span class="tag"><span class="solution">solution</span></span></h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<div id="outline-container-org7159b49" class="outline-2">
|
||||
<h2 id="org7159b49"><span class="section-number-2">3</span> Diffusion Monte Carlo   <span class="tag"><span class="solution">solution</span></span></h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org344d9de" class="outline-3">
|
||||
<h3 id="org344d9de"><span class="section-number-3">4.1</span> Schrödinger equation in imaginary time</h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<div id="outline-container-org851f123" class="outline-3">
|
||||
<h3 id="org851f123"><span class="section-number-3">3.1</span> Schrödinger equation in imaginary time</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
Consider the time-dependent Schrödinger equation:
|
||||
</p>
|
||||
@ -2989,9 +3017,9 @@ system.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org06862e7" class="outline-3">
|
||||
<h3 id="org06862e7"><span class="section-number-3">4.2</span> Diffusion and branching</h3>
|
||||
<div class="outline-text-3" id="text-4-2">
|
||||
<div id="outline-container-orgb662256" class="outline-3">
|
||||
<h3 id="orgb662256"><span class="section-number-3">3.2</span> Diffusion and branching</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<p>
|
||||
The <a href="https://en.wikipedia.org/wiki/Diffusion_equation">diffusion equation</a> of particles is given by
|
||||
</p>
|
||||
@ -3044,9 +3072,9 @@ the combination of a diffusion process and a branching process.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdf62087" class="outline-3">
|
||||
<h3 id="orgdf62087"><span class="section-number-3">4.3</span> Importance sampling</h3>
|
||||
<div class="outline-text-3" id="text-4-3">
|
||||
<div id="outline-container-org0ed0c07" class="outline-3">
|
||||
<h3 id="org0ed0c07"><span class="section-number-3">3.3</span> Importance sampling</h3>
|
||||
<div class="outline-text-3" id="text-3-3">
|
||||
<p>
|
||||
In a molecular system, the potential is far from being constant,
|
||||
and diverges at inter-particle coalescence points. Hence, when the
|
||||
@ -3102,9 +3130,9 @@ error known as the <i>fixed node error</i>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org855e049" class="outline-4">
|
||||
<h4 id="org855e049"><span class="section-number-4">4.3.1</span> Appendix : Details of the Derivation</h4>
|
||||
<div class="outline-text-4" id="text-4-3-1">
|
||||
<div id="outline-container-org5a760ca" class="outline-4">
|
||||
<h4 id="org5a760ca"><span class="section-number-4">3.3.1</span> Appendix : Details of the Derivation</h4>
|
||||
<div class="outline-text-4" id="text-3-3-1">
|
||||
<p>
|
||||
\[
|
||||
-\frac{\partial \psi(\mathbf{r},\tau)}{\partial \tau} \Psi_T(\mathbf{r}) =
|
||||
@ -3165,9 +3193,9 @@ Defining \(\Pi(\mathbf{r},t) = \psi(\mathbf{r},\tau)
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org6fbf6b7" class="outline-3">
|
||||
<h3 id="org6fbf6b7"><span class="section-number-3">4.4</span> Fixed-node DMC energy</h3>
|
||||
<div class="outline-text-3" id="text-4-4">
|
||||
<div id="outline-container-orgf9fe967" class="outline-3">
|
||||
<h3 id="orgf9fe967"><span class="section-number-3">3.4</span> Fixed-node DMC energy</h3>
|
||||
<div class="outline-text-3" id="text-3-4">
|
||||
<p>
|
||||
Now that we have a process to sample \(\Pi(\mathbf{r},\tau) =
|
||||
\psi(\mathbf{r},\tau) \Psi_T(\mathbf{r})\), we can compute the exact
|
||||
@ -3218,9 +3246,9 @@ energies computed with the trial wave function.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4379250" class="outline-3">
|
||||
<h3 id="org4379250"><span class="section-number-3">4.5</span> Pure Diffusion Monte Carlo (PDMC)</h3>
|
||||
<div class="outline-text-3" id="text-4-5">
|
||||
<div id="outline-container-orgbd478f8" class="outline-3">
|
||||
<h3 id="orgbd478f8"><span class="section-number-3">3.5</span> Pure Diffusion Monte Carlo (PDMC)</h3>
|
||||
<div class="outline-text-3" id="text-3-5">
|
||||
<p>
|
||||
Instead of having a variable number of particles to simulate the
|
||||
branching process, one can choose to sample \([\Psi_T(\mathbf{r})]^2\) instead of
|
||||
@ -3271,14 +3299,14 @@ code, so this is what we will do in the next section.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a30f06" class="outline-3">
|
||||
<h3 id="org3a30f06"><span class="section-number-3">4.6</span> Hydrogen atom</h3>
|
||||
<div class="outline-text-3" id="text-4-6">
|
||||
<div id="outline-container-org2828b37" class="outline-3">
|
||||
<h3 id="org2828b37"><span class="section-number-3">3.6</span> Hydrogen atom</h3>
|
||||
<div class="outline-text-3" id="text-3-6">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgba6aa2f" class="outline-4">
|
||||
<h4 id="orgba6aa2f"><span class="section-number-4">4.6.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-4-6-1">
|
||||
<div id="outline-container-orge0e4678" class="outline-4">
|
||||
<h4 id="orge0e4678"><span class="section-number-4">3.6.1</span> Exercise</h4>
|
||||
<div class="outline-text-4" id="text-3-6-1">
|
||||
<div class="exercise">
|
||||
<p>
|
||||
Modify the Metropolis VMC program to introduce the PDMC weight.
|
||||
@ -3376,9 +3404,9 @@ energy of H for any value of \(a\).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2311033" class="outline-5">
|
||||
<h5 id="org2311033"><span class="section-number-5">4.6.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-4-6-1-1">
|
||||
<div id="outline-container-org14a27f3" class="outline-5">
|
||||
<h5 id="org14a27f3"><span class="section-number-5">3.6.1.1</span> Solution   <span class="tag"><span class="solution">solution</span></span></h5>
|
||||
<div class="outline-text-5" id="text-3-6-1-1">
|
||||
<p>
|
||||
<b>Python</b>
|
||||
</p>
|
||||
@ -3593,9 +3621,9 @@ A = 0.98788066666666663 +/- 7.2889356133441110E-005
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org81121c2" class="outline-3">
|
||||
<h3 id="org81121c2"><span class="section-number-3">4.7</span> <span class="todo TODO">TODO</span> H<sub>2</sub></h3>
|
||||
<div class="outline-text-3" id="text-4-7">
|
||||
<div id="outline-container-orge51396e" class="outline-3">
|
||||
<h3 id="orge51396e"><span class="section-number-3">3.7</span> <span class="todo TODO">TODO</span> H<sub>2</sub></h3>
|
||||
<div class="outline-text-3" id="text-3-7">
|
||||
<p>
|
||||
We will now consider the H<sub>2</sub> molecule in a minimal basis composed of the
|
||||
\(1s\) orbitals of the hydrogen atoms:
|
||||
@ -3615,9 +3643,9 @@ the nuclei.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgf5ad8c9" class="outline-2">
|
||||
<h2 id="orgf5ad8c9"><span class="section-number-2">5</span> <span class="todo TODO">TODO</span> <code>[0/3]</code> Last things to do</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<div id="outline-container-org6c71552" class="outline-2">
|
||||
<h2 id="org6c71552"><span class="section-number-2">4</span> <span class="todo TODO">TODO</span> <code>[0/3]</code> Last things to do</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<ul class="org-ul">
|
||||
<li class="off"><code>[ ]</code> Give some hints of how much time is required for each section</li>
|
||||
<li class="off"><code>[ ]</code> Prepare 4 questions for the exam: multiple-choice questions
|
||||
@ -3632,7 +3660,7 @@ the H\(_2\) molecule at $R$=1.4010 bohr. Answer: 0.17406 a.u.</li>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Anthony Scemama, Claudia Filippi</p>
|
||||
<p class="date">Created: 2021-01-30 Sat 12:21</p>
|
||||
<p class="date">Created: 2021-01-30 Sat 21:41</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user