Skip to content

First tutorial on GWR (GW in real-space and imaginary time)

The quasi-particle band structure of Silicon in the GW approximation.

This tutorial aims at showing how to calculate self-energy corrections to the DFT Kohn-Sham (KS) eigenvalues in the on-shot GW approximation using the GWR code

The user should be familiarized with the four basic tutorials of ABINIT, see the tutorial home page.

This tutorial should take about 2 hours.

WARNING : THIS TUTORIAL IS WORK IN PROGRESS ! IT IS NOT YET COMPLETE …

Note

Supposing you made your own installation of ABINIT, the input files to run the examples are in the ~abinit/tests/ directory where ~abinit is the absolute path of the abinit top-level directory. If you have NOT made your own install, ask your system administrator where to find the package, especially the executable and test files.

In case you work on your own PC or workstation, to make things easier, we suggest you define some handy environment variables by executing the following lines in the terminal:

export ABI_HOME=Replace_with_absolute_path_to_abinit_top_level_dir # Change this line
export PATH=$ABI_HOME/src/98_main/:$PATH      # Do not change this line: path to executable
export ABI_TESTS=$ABI_HOME/tests/             # Do not change this line: path to tests dir
export ABI_PSPDIR=$ABI_TESTS/Psps_for_tests/  # Do not change this line: path to pseudos dir

Examples in this tutorial use these shell variables: copy and paste the code snippets into the terminal (remember to set ABI_HOME first!) or, alternatively, source the set_abienv.sh script located in the ~abinit directory:

source ~abinit/set_abienv.sh

The ‘export PATH’ line adds the directory containing the executables to your PATH so that you can invoke the code by simply typing abinit in the terminal instead of providing the absolute path.

To execute the tutorials, create a working directory (Work*) and copy there the input files of the lesson.

Most of the tutorials do not rely on parallelism (except specific tutorials on parallelism). However you can run most of the tutorial examples in parallel with MPI, see the topic on parallelism.

Ground-state computation

The first dataset produces the density file that used to compute the band structure in the second dataset. We will also use this DEN file to generate the WFK with empty states in the next section.

Generation of the WFK file with empty states

###########################################
# Dataset 2: Direct diago with empty states
###########################################
optdriver2  6        # Activate GWR code
gwr_task2 "HDIAGO"   # Direct diagonalization
getden2       1
nband2     40        # Number of (occ + empty) bands

Important

gwr_task2 “HDIAGO_FULL”

The direct diagonalization is MPI-parallelized across three different levels: collinear spin \sigma, k-points and scalapack distribution of the H^\sigma_\kk(\bg,\bg') matrix. Abinit will try to find an optimal distribution of the workload at runtime yet there are a couple of things worth keeping in mind when choosing the number of MPI processes for this step. Ideally the total number of cores should be a multiple of nkpt * nsppol to avoid load imbalance.

QP corrections with GWR

The k-points for the QP corrections can be specified in different ways.

Explicitly via:

nkptgw, kptgw and bdgw

Implicitly via gw_qprange

For the spectral function

nfreqsp, freqspmax

Notes on the MPI parallelization

The GWR code employs gwr_np_kgts. Ideally the total number of MPI processes should be a multiple of gwr_ntau * nsppol.