Yambo input file for GW calculations explained

yambo code
Example of a yambo input file for GW calculation in a solid. In order to generate the following input file you can use the command “yambo -g n -p p -V par" with yambo 4.0.2 (and with yambo 3.4.2  “yambo -g n -p p”).

 

gw0                                         # [R GW] GoWo Quasiparticle energy levels
ppa                                         # [R Xp] Plasmon Pole Approximation
rim_cut                                     # [R RIM CUT] Coulomb potential
HF_and_locXC                                # [R XX] Hartree-Fock Self-energy and Vxc
em1d                                        # [R Xd] Dynamical Inverse Dielectric Matrix
NLogCPUs=0                                  # [PARALLEL] Live-timing CPU`s (0 for all)

X_all_q_CPU= "2 2 2 2"                      # [PARALLEL] CPUs for each role
X_all_q_ROLEs= "q k c v"                    # [PARALLEL] CPUs roles (q,k,c,v)
Parallelization of the dieletric constant the product of each role
in X_all_q_CPU should be equal to the total number of processors. 
In this example I use 16 processors 2x2x2x2.  Notice that the parallelization in q 
is more efficient but use more memory.

X_all_q_nCPU_invert=4 # [PARALLEL] CPUs for matrix inversion
Number of processors to invert the dielectric constant.
In general matrix inversion is very inefficiently parallelized, therefore 
do not use many processor for this part, I advice about 4.


X_Threads= 1 # [OPENMP/X] Number of threads for response functions
DIP_Threads= 1 # [OPENMP/X] Number of threads for dipoles
SE_Threads= 1 # [OPENMP/GW] Number of threads for self-energy
If your calculation uses to much memory you can run with openmp and increase 
here the number of Threads for the dipoles,  xhi and the self-energy. 
Use the same number in all of them.

SE_CPU= "2 4 2" # [PARALLEL] CPUs for each role
SE_ROLEs= "q qp b" # [PARALLEL] CPUs roles (q,qp,b)
Similar to the previous parallelization.
The total product should equal to the number of processors. The parallelization
in qp is the more efficient while the one on b uses less memory.

FFTGvecs= 20065 RL           # [FFT] Plane-waves
Total number of G-vectors used in the calculation.
Decrease this number to use less memory.

RandQpts= 3000000 # [RIM] Number of random q-points in the BZ
RandGvec= 1 RL # [RIM] Coulomb interaction RS components
Parameters for numerical integration
of the Coulomb potentianl at q=0. Do not change them.

EXXRLvcs= 20065 RL # [XX] Exchange RL components
Number of G-vectors in the exchange, Eq. 104 in Ref[1].This number should be less than 
the total number of G-vectors FFTGvecs otherwise yambo automatically 
decreases it to FFTGvecs. 

Chimod= "" # [X] IP/Hartree/ALDA/LRC/BSfxc
% BndsRnXp
 1 | 1600 | # [Xp] Polarization function bands
%
Number of bands in the dielectric constant calculation.
See eq. 102 in Ref. [1]

NGsBlkXp= 3002 mHa # [Xp] Response block size
Number of G-vectors in the dielectric constant, see Eq. 26 and 27 in Ref. [1]

% LongDrXp
 1.000000 | 0.000000 | 0.000000 | # [Xp] [cc] Electric Field
%
Direction of the electric field for the calculation of the q=0 component
of the dielectric constant e(q,w)

PPAPntXp= 27.21138 eV # [Xp] PPA imaginary energy
 Second frequency used to fit the Godby-Needs plasmon-pole model (PPM).
If results change by changing this frequency, the PPM is not adequate for your calculation.

% GbndRnge
 1 | 1600 | # [GW] G[W] bands range
%
Number of bands used to expand the Green's function, Eq. 110 in Ref. [1]
This number is usually larger than the number of bands used to calculated the dielectric
constant. You can use the same number for both. 

GDamping= 0.10000 eV # [GW] G[W] damping
Damping in the Green's function definition, the delta 
parameter in Eq. 49 in Ref. [2]. Few people investigate the effect of this parameters 
on the final results, usually everybody assume it equal to 0.1 eV. 

dScStep= 0.10000 eV # [GW] Energy step to evaluate Z factors
DysSolver= "n" # [GW] Dyson Equation solver ("n","s","g")
 Parameters related to the linearized solution
of the Dyson equation, see Eq. 58 in Ref.[2].

GTermKind= "BRS" # [GW] GW terminator ("none","BG" Bruneval-Gonze,"BRS" Berger-Reining-Sottile)
Terminator for the self-energy and the dielectric constant.
This flag speeds-up the convergence with the number of conduction bands, 
see Phys. Rev. B 82, 041103(R).

%QPkrange # [GW] QP generalized Kpoint/Band indices
 1| 2|144|432|
%
K-points and band range where you want to calculate
the GW correction. The syntax is
first kpoint | last kpoint | first band | last band

If you are working with isolated molecules consider the following  tricks and suggestions in your input file.
1) Add the Coulomb cut-off to your input by adding the -r (-c in yambo 3.4.1) flag in the yambo comand line

CUTGeo= "box XYZ"               # [CUT] Coulomb Cutoff geometry: box/cylinder/sphere X/Y/Z/XY..
% CUTBox
 10.00     | 10.00     | 20.00     |        # [CUT] [au] Box sides
%
CUTRadius= 0.000000          # [CUT] [au] Sphere/Cylinder radius
CUTCylLen= 0.000000          # [CUT] [au] Cylinder length
These parameters specify a cut-off for the Coulomb interaction
in such a way to speed-up convergence with the supercell. My advise is to use
the box cut-off with sides slightly smaller than the cell. In this
example I suppose to have a supercell (12x12x22 a.u.) and I choose
a cutoff 10x10x20 a.u. (see PRB 73, 205119)

2) Parallelization for isolated systems:

when you a single-kpoint (for an isolated molecule for example) you cannot
parallelize in q and k  you have
to set the number of processors for these roles equal to 1.

References:
[1] Quasiparticle calculations in solids
AULBUR W. G., JÖNSSON L., WILKINS J. W.
http://www.physics.ohio-state.edu/~wilkins/vita/gw_review.ps

[2] The GW method
F. Aryasetiawan and O. Gunnarsson.
http://xxx.lanl.gov/pdf/cond-mat/9712013v1

12 thoughts on “Yambo input file for GW calculations explained

  1. Pingback: Yambo input file for BSE calculations explained | Claudio Attaccalite's Homepage

  2. Simil

    Hi,
    I have a system with an organic molecule on top of Au surface. Is it possible to get Projected Density Of States (PDOS) of the molecule after GW calculations in Yambo?

    Reply
    1. attacc Post author

      Dear Simil

      as fas as I know, it is not possible. You can try to look if you can force
      quantum-espresso to read the quasi-particle correction before calculation the PDOS,
      but I don’t know how much it can be complicated

      regards
      Claudio

      Reply
  3. Fabio

    Hi, i have a question regarding the GW convergence.

    BndsRnXp, NGsBlkXp, GbndRnge cannot be converged independently, right?

    For what i have saw in my results, these quantities are inter-dependent.
    Am i doing something wrong? If not, is there a way to reduce the number of calculations we have to do
    for reach convergence? Aren’t BndsRnXp and NGsBlkXp related somehow?

    Fabio

    Reply
    1. attacc Post author

      Dear Fabio

      regarding BndsRnXp, NGsBlkXp you are right, they are inter-dependent,
      but GbndRnge should be independent from the other two.
      Try to converge BndsRnXp, NGsBlkXp together and then converge GbndRnge.
      Usually the gap converges faster than the single band values.

      Let me know
      Claudio

      Reply
      1. Fabio

        Dear Claudio,

        I converged BndsRnXp, NGsBlkXp together with GbndRnge (100) fixed.
        I found that BndsRnXp=500 , and NGsBlkXp=8 Ry is enough to reach convergence.

        Then I converged GbndRnge, with BndsRnXp=500, NGsBlkXp=8, 10, 12, 14 Ry.
        I found that the convergence is achieved for GbndRnge=500, BndsRnXp=500, NGsBlkXp=12 Ry and not NGsBlkXp=8 Ry.

        I considered a convergence criterion within 0.05 eV.

        This shows that there is an inter-dependence between
        GbndRnge and NGsBlkXp. Is that normal?

        Thanks you,

        Fabio

        Reply
        1. attacc Post author

          Dear Fabio

          yes this is normal, in the sense that usually the inter-dependence between GbndRnge and NGsBlkXp
          is small but not zero.
          Notice that in general number of bands to converge the Green’s functions
          is larger than the one for the dielectric constant GbndRnge >= BndsRnXp.
          Did you converge the absolute value of the bands or their energy difference (as the gap)?
          Because in general the energy difference converge fast, while the absolute value is slower.

          Claudio

          Claudio

          Reply
          1. Fabio

            Dear Claudio,

            I converged the energy difference. But the inter-dependence
            between GbndRnge and NGsBlkXp is indeed small.

            And my convergence criterion is <= 0.05 eV. If i choose <= 0.1 eV a smaller
            GbndRnge and NGsBlkXp would be enough.

            Thank you,
            Fabio

  4. Shi

    Hi Claudio,
    I have a general question regarding GW and BSE.
    Say I have finished those heavy calculations, which files/folder should I back up in order to reproduce those calculations in the future while reducing the computational time? Is that even possible?
    It is hard to back up all the files (in many cases > 10Gb).
    I used yambo -J job_string_dir when running yambo. So some files are stored in job_string_dir as well besides SAVE directory.

    Thanks!

    Shi

    Reply
    1. attacc Post author

      Dear Shi
      it depends from your calculation. If you performed GW calculation, the imporat results
      are in the ndb.QP that contains all information about the quasi-particle corrections.
      If you performed BSE, the files are the ndb.BS*, that contain the BSE matrix.
      Another important file could be the dielectric constant ndb.pp*

      best
      Claudio

      Reply
  5. Manaswita Kar

    Hi Claudio,

    Could you please let me know how can I set the units of NGsBlkXp in Rydberg? I have been trying this (the default is RL) but I get the following error:

    [ERROR] Initialization not yet done. Use RL units in input or run initialization

    I run initialisation by just typing Yambo, right? Please let me know.

    Thanks and Regards,
    Manaswita
    Sorbonne University, Paris

    Reply
    1. attacc Post author

      You have to run the setup before
      just do:
      yambo -i
      to generate the input, and then run yambo.
      Now you can start other calculations and you will not have that error anymore.

      Reply

Leave a Reply to Shi Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.