Pushing convergence in parallel: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
Line 68: Line 68:
== Convergence with the energy cut-off on the response function ==
== Convergence with the energy cut-off on the response function ==


The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the <math>\chi_{G,G'}(\omega)</math> matrix
NGsBlkXp= <span style="color: red">4            Ry</span>    # [Xp] Response block size
Even in this case try changing the input value from a low value to a big one.
Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8.
This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run.
just change the script back as
<span style="color: red">#</span>srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J "$jdir,$auxjdir" -C $cdir
srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J <span style="color: red">$jdir</span> -C $cdir


== Convergence with the number of k-points (optional) ==
== Convergence with the number of k-points (optional) ==

Revision as of 08:16, 26 April 2017

2D hBN

In the previous session we focused on the scaling properties of the code. We now focus more on the physical aspect.

The system we are working on is the 2D-hBN sheet we already used the first day.

Atomic structure of 2D hBN

If you want a published reference of quasi-particle properties of hBN you can have a look to the following arxiv, https://arxiv.org/abs/1511.00129 (Phys. Rev. B 94, 155406 (2016)), and references therein, were the GW correction are computed. In that case the convergence with the number of k-points is studied in detail (for hBN and other materials). The focus is on a proper description of the q->0 limit of the (screened) electron-electron interaction entering the GW self-energy. As you can see from the below image extracted from the arxiv the QP corrections converge slowly with the number of k-points.

Yambo tutorial image

In the present tutorial you will start using a 12x12 grid. Only in the last part we will re-run pw.x (optional) to generate bigger k-grids

Tomorrow you will learn how to do that in a more automatic way using the yambopy scripting tools, however running yambo in serial. While yambopy offers an easier interface for the use, in the present parallel tutorial you will be able to push much more the convergence. In a real life calculation you will likely take advantage of both.

Convergence on the number bands in X and G

To do convergence calculations you need to execute the same run many time, progressively changing one (or more of the input variables) We start considering the number of bands entering the construction of the response function. This will then be used to compute the screened electron-electron interaction, W, needed for the GW self-energy.

% BndsRnXp
    1 |  200 |               # [Xp] Polarization function bands
%

Try to use different values, going to a very small one (say 10) up to the maximum allowed by the number of bands computed with pw.x to generate the present database (400). You may use 10, 25, 50, 100, 200, 400. Since now the focus is not anymore on the number of cores but on the yambo input parameters, it is a good idea to label the jobname accordingly to the latter in the run.sh script:

  label=Xnb${nbands}_Gnb200_ecut4Ry


Then you can use the parse_qp.py script to extract the direct gap using the command

./parse_qp.py $jobname/o-*.qp

The output should be something similar to

#nbnd ibndval  Egap [eV]
  25    4        6.848440000 
  50    4        6.759580000 
  75    4        6.724210000 
 100    4        6.712120000 
 200    4        6.717220000 
 400    4        6.733410000

Now you can try to do the same with the number of bands entering the definition of the green function

% GbndRnge
    1 |  200 |               # [GW] G[W] bands range
%

You can do the same numbers we tried for the bands entering the response function. It is also a good idea to let yambo read the screening from a previous run. To this end you need to create a folder and copy there the screening DB

$ mkdir SCREENING_400bands
$ cp Xnb400_Gnb200_ecut4Ry/ndb.pp* SCREENING_400bands

Then, to let yambo read it, edit the job.sh script creating the new variable

auxjdir=SCREENING_400bands

and

srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J "$jdir,$auxjdir" -C $cdir

tips:
- remember to run in parallel, we suggest you keep using 16 cores, with 2 OpenMP threads, but for the biggest runs you can try to use even more than one node

Convergence with the energy cut-off on the response function

The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the [math]\displaystyle{ \chi_{G,G'}(\omega) }[/math] matrix

NGsBlkXp= 4            Ry    # [Xp] Response block size

Even in this case try changing the input value from a low value to a big one. Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8. This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run. just change the script back as

#srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J "$jdir,$auxjdir" -C $cdir
srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J $jdir -C $cdir

Convergence with the number of k-points (optional)


Prev: Tutorials Home Now: Tutorials Home --> GW Convergence Next: Parallel tutorials are over