User Tools

Site Tools


tutorials:basic2

The $H_2$ molecule, with convergence studies.

<html> <head> <title>Tutorial #2</title> </head> <body bgcolor=“#ffffff”> <hr> <p>This lesson aims at showing how to get converged values for the following physical properties : <ul> <li>the bond length <li>the atomisation energy </ul> You will learn about the numerical quality of the calculations, then make convergence studies with respect to the number of planewaves and the size of the supercell, and finally consider the effect of the XC functional. The problems related to the use of different pseudopotential are not examined.

<p>You will also finish to read the abinit_help file.

<p>This lesson should take about 1 hour.

<h5>Copyright (C) 2000-2013 ABINIT group (XG,RC) <br> This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or <a href=“http://www.gnu.org/copyleft/gpl.txt”> http://www.gnu.org/copyleft/gpl.txt </a>. <br> For the initials of contributors, see ~abinit/doc/developers/contributors.txt . </h5>

<script type=“text/javascript” src=“list_internal_links.js”> </script>

<h3><b>Content of lesson 2</b></h3> <ul>

<li><a href="lesson_base2.html#20">2.0</a> Summary of the previous lesson</li>
<li><a href="lesson_base2.html#21">2.1</a> The convergence in <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a></li>
<li><a href="lesson_base2.html#22">2.2</a> The convergence in <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a></li>
<li><a href="lesson_base2.html#23">2.3</a> The convergence in <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a></li>
<li><a href="lesson_base2.html#24">2.4</a> The final calculation in Local (Spin)
  Density Approximation.</li>
<li><a href="lesson_base2.html#25">2.5</a> The use of the Generalized Gradient Approximation.</li>

</ul> <hr> <h4><a name=“20”></a></h4> <h3><b>2.0. Summary of the previous lesson.</b></h3>

<p>We studied the H2 molecule in a big box.

We used 10 Ha as cut-off energy, a 10x10x10 Bohr^3 supercell, the local-density
approximation (as well as the local-spin-density approximation) in the Teter
parametrization (<a href="../input_variables/varbas.html#ixc" target="kwimg">ixc</a>=1, the default),
and a pseudopotential from the Goedecker-Hutter-Teter table.

<p>At this stage, we compared our results : <ul>

<li>bond length : 1.522 Bohr</li>
<li> atomisation energy at that bond length : 0.1656 Ha = 4.506 eV</li>

</ul> with the experimental data (as well as theoretical data using a much more accurate technique than DFT) <ul>

<li> bond length : 1.401 Bohr</li>
<li> atomisation energy : 4.747 eV</li>

</ul> The bond length is awful (nearly 10% off), and the atomisation energy is a bit too low, 5 % off. <h3><br>

<hr>

<a name="21">&nbsp;</a> <a name="22">&nbsp;</a> </h3>

<p><h3><b>2.1 and 2.2 The convergence in ecut</b></h3>

<p><b>2.1.a</b><b> Computing the bond length and corresponding atomisation energy in one run.</b>

<p>

<i>Before beginning, you might consider to work in a different subdirectory as for lesson_base1. Why not “Work2” ? </i> <br>

<p>Because we will compute many times the bond length and atomisation energy,

it is worth to make a single input file that will do all the associated operations.
You should try to use 2 datasets (try to combine ~abinit/tests/tutorial/Input/tbase1_3.in
with ~abinit/tests/tutorial/Input/tbase1_5.in !). Do not try to have the
same position of the H atom as one of the H2 atoms in the optimized geometry.

<p>The input file ~abinit/tests/tutorial/Input/tbase2_1.in</a> is an example

of file that will do the job, while ~abinit/tests/tutorial/Refs/tbase2_1.out</a>
is an example of output file.
You might use ~abinit/tests/tutorial/Input/tbase2_x.files</a>
as "files" file (do not forget to modify it, like in lesson 1), although it does not differ from
~abinit/tests/tutorial/Input/tbase1_x.files. The run should take less than one minute.

<p>You should obtain the values : <pre>

  etotal1  -1.1058360644E+00
  etotal2  -4.7010531489E-01

</pre> and <pre>

  xcart1  -7.6091015760E-01  0.0000000000E+00  0.0000000000E+00
           7.6091015760E-01  0.0000000000E+00  0.0000000000E+00

</pre> <p>These are similar to those determined in <a href=“lesson_base1.html”>lesson 1</a>,

although they have been obtained in one run. You can also check that the residual
forces are lower than <code>5.0d-4</code>.
Convergence issues are discussed in
<a href="../users/abinit_help.html#7" target="helpsimg">section 7</a>
of the abinit_help file.<a name="ref11"></a><br>
You should read it. By the way, you have read many parts of the abinit_help
file ! You are missing the sections
<a href="../users/abinit_help.html#2" target="helpsimg">2</a>,
<a href="../users/abinit_help.html#5" target="helpsimg">5</a>,
<a href="../users/abinit_help.html#8" target="helpsimg">8</a>. You are also missing the
description of many input variables. We suggest that you finish reading
entirely the abinit_help file now, while the knowledge of the input variables will
come in the long run. </p>

<p><b>2.1.b</b> Many convergence parameters have already been identified. We will

focus only on <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a> and <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a>.
This is because

<ul>

<li> the convergence of the SCF cycle and geometry determination are well under
  control thanks to <a href="../input_variables/varbas.html#toldfe" target="kwimg">toldfe</a>,
  <a href="../input_variables/varbas.html#toldff" target="kwimg">toldff</a> and <a href="../input_variables/varrlx.html#tolmxf" target="kwimg">tolmxf</a>
  (this might not be the case for other physical properties)</li>
<li> there is no k point convergence study to be done for an isolated system
  in a big box : no additional information is gained by adding a k-point beyond one</li>
<li> the boxcut value is automatically chosen larger than 2 by ABINIT, see the
  determination of the input variable "<a href="../input_variables/vargs.html#ngfft" target="kwimg">ngfft</a>"
  by preprocessing</li>
<li> we are using <a href="../input_variables/varrlx.html#ionmov" target="kwimg">ionmov</a>=3
  for the determination of the geometry.</li>

</ul>

For the check of convergence with respect to <a href=“../input_variables/varbas.html#ecut” target=“kwimg”>ecut</a>, you have the choice between doing different runs of the tbase2_1.in file with different values of <a href=“../input_variables/varbas.html#ecut” target=“kwimg”>ecut</a>, or doing a double loop of datasets, as proposed in ~abinit/tests/tutorial/Input/tbase2_2.in . The values of <a href=“../input_variables/varbas.html#ecut” target=“kwimg”>ecut</a> have been chosen between 10Ha and 35Ha, by step of 5 Ha. If you want to make a double loop, you might benefit of reading again the <a href=“../users/abinit_help.html#loop” target=“helpsimg”>double-loop section</a> of the abinit_help file.

<p><b>2.2.a</b> You have likely seen a big increase of the CPU time needed to do the calculation (now, about one minute on a PC 3 GHz). You should also look at the increase of the memory needed to do the calculation (go back to the beginning of the output file). The output data are as follows : <pre>

  etotal11 -1.1058360644E+00
  etotal12 -4.7010531489E-01
  etotal21 -1.1218716100E+00
  etotal22 -4.7529731401E-01
  etotal31 -1.1291943792E+00
  etotal32 -4.7773586424E-01
  etotal41 -1.1326879404E+00
  etotal42 -4.7899908214E-01
  etotal51 -1.1346739190E+00
  etotal52 -4.7972721653E-01
  etotal61 -1.1359660026E+00
  etotal62 -4.8022016459E-01
   xcart11 -7.6091015760E-01  0.0000000000E+00  0.0000000000E+00
            7.6091015760E-01  0.0000000000E+00  0.0000000000E+00
   xcart12  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart21 -7.5104912643E-01  0.0000000000E+00  0.0000000000E+00
            7.5104912643E-01  0.0000000000E+00  0.0000000000E+00
   xcart22  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart31 -7.3977108831E-01  0.0000000000E+00  0.0000000000E+00
            7.3977108831E-01  0.0000000000E+00  0.0000000000E+00
   xcart32  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart41 -7.3304273322E-01  0.0000000000E+00  0.0000000000E+00
            7.3304273322E-01  0.0000000000E+00  0.0000000000E+00
   xcart42  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart51 -7.3001570260E-01  0.0000000000E+00  0.0000000000E+00
            7.3001570260E-01  0.0000000000E+00  0.0000000000E+00
   xcart52  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart61 -7.2955902118E-01  0.0000000000E+00  0.0000000000E+00
            7.2955902118E-01  0.0000000000E+00  0.0000000000E+00
   xcart62  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00

</pre> The corresponding atomisation energies and interatomic distances are : <pre> ecut atomisation interatomic distance (Ha) energy (Ha) (Bohr)

10 .1656 1.522 15 .1713 1.502 20 .1737 1.480 25 .1747 1.466 30 .1753 1.460 35 .1756 1.459 </pre> In order to obtain 0.2% relative accuracy on the bond length or atomisation energy, one should use a kinetic cut-off energy of 30 Ha. We will keep in mind this value for the final run.

<p>Well, 30 Ha is a large kinetic energy cut-off ! The pseudopotential that we are using for Hydrogen is rather “hard” …

<p> <hr>

<h3><p><b><a name=“23”>2.3</a> The convergence in acell</b></h3>

<p>The same technique as for <a href=“../input_variables/varbas.html#ecut” target=“kwimg”>ecut</a>

should be now used for the convergence in <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a>.
We will explore <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a> starting
from <code>8 8 8</code> to <code>18 18 18</code>, by step of <code>2 2 2</code>.
We keep <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a> 10 for this study.
Indeed, it is a rather general rule that there is little cross-influence between
the convergence of <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a> and the
convergence of <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a>. The file
~abinit/tests/tutorial/Input/tbase2_3.in can be used as an example. The CPU time needed
is also on the order of one minute.
The output data (~abinit/tests/tutorial/Refs/tbase2_3.out)
are as follows :

<pre>

  etotal11 -1.1188128741E+00
  etotal12 -4.8074164402E-01
  etotal21 -1.1058360644E+00
  etotal22 -4.7010531489E-01
  etotal31 -1.1039109441E+00
  etotal32 -4.6767804802E-01
  etotal41 -1.1039012761E+00
  etotal42 -4.6743724199E-01
  etotal51 -1.1041439319E+00
  etotal52 -4.6735895176E-01
  etotal61 -1.1042058195E+00
  etotal62 -4.6736729718E-01
   xcart11 -7.8427127284E-01  0.0000000000E+00  0.0000000000E+00
            7.8427127284E-01  0.0000000000E+00  0.0000000000E+00
   xcart12  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart21 -7.6091015760E-01  0.0000000000E+00  0.0000000000E+00
            7.6091015760E-01  0.0000000000E+00  0.0000000000E+00
   xcart22  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart31 -7.5472588642E-01  0.0000000000E+00  0.0000000000E+00
            7.5472588642E-01  0.0000000000E+00  0.0000000000E+00
   xcart32  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart41 -7.5491961064E-01  0.0000000000E+00  0.0000000000E+00
            7.5491961064E-01  0.0000000000E+00  0.0000000000E+00
   xcart42  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart51 -7.5427730675E-01  0.0000000000E+00  0.0000000000E+00
            7.5427730675E-01  0.0000000000E+00  0.0000000000E+00
   xcart52  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00
   xcart61 -7.5415348434E-01  0.0000000000E+00  0.0000000000E+00
            7.5415348434E-01  0.0000000000E+00  0.0000000000E+00
   xcart62  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00

</pre> The corresponding atomisation energies and interatomic distances are : <table width=“687” height=“84” cellspacing=“2” cellpadding=“2” border=“1”>

<tr>
  <td width="82">
    <div align="center">acell<br>
      (Bohr)</div>
  </td>
  <td width="168">
    <div align="center">atomisation<br>
      energy (Ha)</div>
  </td>
  <td width="82">
    <div align="center">interatomic distance<br>
      (Bohr)</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">8 </div>
  </td>
  <td width="168">
    <div align="center">.1574</div>
  </td>
  <td width="82">
    <div align="center">1.568</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">10</div>
  </td>
  <td width="168">
    <div align="center">.1656</div>
  </td>
  <td width="82">
    <div align="center">1.522</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">12</div>
  </td>
  <td width="168">
    <div align="center">.1686</div>
  </td>
  <td width="82">
    <div align="center">1.509</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">14</div>
  </td>
  <td width="168">
    <div align="center">.1691</div>
  </td>
  <td width="82">
    <div align="center">1.510</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">16</div>
  </td>
  <td width="168">
    <div align="center">.1694</div>
  </td>
  <td width="82">
    <div align="center">1.508</div>
  </td>
</tr>
<tr>
  <td width="82">
    <div align="center">18</div>
  </td>
  <td width="168">
    <div align="center">.1695</div>
  </td>
  <td width="82">
    <div align="center">1.508</div>
  </td>
</tr>

</table> <p> In order to reach 0.2% convergence on the interatomic distance, one needs

<code> acell 12 12 12</code>.
The atomisation energy needs <code>acell 14 14 14</code> to be converged at that level.
At <code>12 12 12</code>, the difference is <code>.0009 Ha=0.024eV</code>, which
is sufficiently small for practical purposes.
We will use <code>acell 12 12 12</code> for the final run.

<p>For most solids the size of the unit cell will be smaller than that. We are treating a lot of vacuum in this supercell ! So, the H2 study, with this pseudopotential, turns out to be not really easy. Of course, the number of states to be treated is minimal ! This allows to have reasonable CPU time still.

<p>

<hr>

<p><h3><b><a name=“24”>2.4</a> The final calculation in Local (Spin) Density Approximation.</b></h3>

<p>We now use the correct values of both <a href=“../input_variables/varbas.html#ecut” target=“kwimg”>ecut</a>

and <a href="../input_variables/varbas.html#acell" target="kwimg">acell</a>. Well, you should
modify the tbase2_3.in file to make a calculation
with <code>acell 12 12 12</code>
and <code>ecut 30</code>.
You can still use the double loop feature with
<code><a href="../input_variables/varbas.html#udtset" target="kwimg">udtset</a>
1 2</code> (which reduces to a single loop), to minimize the modifications to
the file. The file ~abinit/tests/tutorial/Input/tbase2_4.in can be taken as an example of input
file, and ~abinit/tests/tutorial/Refs/tbase2_4.out as an example of output file.

<p>Since we are doing the calculation at a single

(<a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a>,
<a href="../input_variables/varbas.html#acell" target="kwimg">acell</a>) pair, the total CPU time
is not as much as for the previous determinations of optimal values through
series calculations. However, the memory needs have still increased a bit.

<p>The output data are : <pre>

  etotal11 -1.1329372051E+00
  etotal12 -4.7765320721E-01
   xcart11 -7.2662135225E-01  0.0000000000E+00  0.0000000000E+00
            7.2662135225E-01  0.0000000000E+00  0.0000000000E+00
   xcart12  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00

</pre>

<ul> <li>The corresponding atomisation energy is

0.1776 Ha =  4.833 eV

<li>The interatomic distance is 1.4532 Bohr. <li>These are our final data for the local (spin) density approximation. </ul>

We have used

<a href="../input_variables/varbas.html#ixc" target="kwimg">ixc</a>=1

. Other expressions for the local (spin) density approximation

<a href="../input_variables/varbas.html#ixc" target="kwimg">ixc</a>=2,
3 .. 7

are possible. The values 1, 2, 3 and 7 should give about the same results, since they all start from the XC energy of the homogeneous electron gas, as determined by Quantum Monte Carlo calculations. <br> Other possibilities

<a href="../input_variables/varbas.html#ixc" target="kwimg">ixc</a>=4,
5, 6

are older local density functionals, that could not rely on these data.

<p>

<hr>

<p><h3><b><a name=“25”>2.5</a> The use of the Generalized Gradient Approximation.</b></h3>

<p>We will use the Perdew-Burke-Ernzerhof functional, proposed in Phys. Rev. Lett. 77, 3865 (1996).

<p>In principle, for GGA, one should use another pseudopotential than for LDA. However, for the special case of Hydrogen, and in general pseudopotentials with a very small core (including only the 1s orbital), pseudopotentials issued from the LDA and from the GGA are very similar.

<p>So, we will not change our pseudopotential. This will save us lot of time,

as we should not redo an <a href="../input_variables/varbas.html#ecut" target="kwimg">ecut</a>
convergence test (ecut is often characteristic of the pseudopotentials that
are used in a calculation).

<p>Independently of the pseudopotential, an <a href=“../input_variables/varbas.html#acell” target=“kwimg”>acell</a>

convergence test should not be done again, since the vacuum is treated similarly
in LDA or GGA.

<p>So, our final values within GGA will be easily obtained, by setting <a href=“../input_variables/varbas.html#ixc” target=“kwimg”>ixc</a>

to 11 in the input file tbase2_4.in. See ~abinit/tests/tutorial/Input/tbase2_5.in
for an example.

<pre>

  etotal11 -1.1621428502E+00
  etotal12 -4.9869631917E-01
   xcart11 -7.1204535408E-01  0.0000000000E+00  0.0000000000E+00
            7.1204535408E-01  0.0000000000E+00  0.0000000000E+00
   xcart12  0.0000000000E+00  0.0000000000E+00  0.0000000000E+00

</pre> <ul> <li>The corresponding atomisation energy is

0.1647 Ha =  4.482 eV
<li>The interatomic distance is <code>1.4241 Bohr</code>.
<li>These are our final data for the generalized gradient approximation.

</ul> Once more, here are the experimental data : <ul> <li>bond length : 1.401 Bohr <li>atomisation energy : 4.747 eV </ul> In GGA, we are within 2% of the experimental bond length, but 5% of the experimental atomisation energy. In LDA, we were within 4% of the experimental bond length, and within 2% of the experimental atomisation energy.

<p><i>Do not forget that the typical accuracy of LDA and GGA varies with the class of materials studied…</i>

<script type=“text/javascript” src=“list_internal_links.js”> </script>

</body> </html>

tutorials/basic2.txt · Last modified: 2016/04/24 15:09 by Yann Pouillon