This is currently the fastest option. The main reason for the speed is a diagonal approximation to the self-energy — only energies of a few occupied and unoccupied levels (close to Fermi energy) are corrected, starting with a mean-field eigen states. As mean-field starting point we can use any of the following LDA, PBE, HF, SEX, COHSEX, PBEh Hamiltonians. Second reason is that the screened interaction is computed along the imaginary frequency axis, at a small number of points (distributed on a logarithmic grid) and at only several points close to real axis, according to the contour deformation technique. Third reason for speed is, paradoxically, an $O(N^4)$ algorithm of computing the response function, which turns out to be about five times faster than time-frequency domain methods. The latter methods although having a lower complexity scaling $O(N^3)$ are slower for any molecules we have tried, including carbon flakes with more than 300 atoms.

Without further delay, we give an input file for an imaginary-axis $GW$ calculation below. After the input, we give extensive comments for important parameters.

```
verbosity 1 !! Verbosity can be any integer number, 1 must be good for end-user runs.
eigmin_local 1E-9 !! Threshold for local products: see below
eigmin_bilocal 1E-11 !! Threshold for bilocal products: see below
jcutoff 16 !! Angular momentum cutoff in the representation of bilocal product functions: see below
gwa_initialization siesta_pb !! A particular procedure for initialization of mean-field calculation;
prod_basis_type MIXED DOMIPROD
prod_basis_procedure ONLY-PB
dealloc_bilocal 1
diag_hs 0
diag_overlap 1
diag_kernel 1
DOS_compute 0
DOS_Zero_Level Vacuum Fermi (Vacuum)
! Parameters for SCF
do_scf 1
xc_me_algorithm EQU_RSPACE ATOMS (EQU_RSPACE)
MeshCutoff 3400
xc_functional_siesta GGA
xc_authors_siesta PBE
xc_functional HF
xc_authors HF
MaxSCFiterations 1000
DM_MixingWeight 0.5
UseSaveDM 0
! Parameters for GW_IA
do_gwa_ia 1
MaxIterG0W0Eigval 5
nocc_to_correct 1
nvrt_to_correct 1
nff_imag_axis 64
tol_imag_axis 1e-5
sf_GW_corr_algorithm BLOCK FULLMAT (BLOCK)
gw_corr_res_algorithm XX_BLK XX_FM SE (SE)
g0w0_eigvals_algorithm SF SE (SF)
```

Let's go through the input file, describing more details in the $GW$ part.

`do_GWA_IA 1`

This is a switch to demand the $G_0W_0$ calculation with quantities computed along Imaginary Axis (of frequency). Only few values of self-energy will be computed according to a contour deformation technique.

`MaxIterG0W0Eigval 5`

This is a fixed number of iterations in an eigen-value self-consistency loop. During this loop, the GW eigenvalues are determined. Normally, this leads to a good comparison with the poles detected by a direct inversion of the resolvent $H+\omega S$.

`nocc_to_correct 1`

The number of occupied states to be corrected according to $GW$ self-energy.

`nvrt_to_correct 1`

Number of virtual states to correct in a GW calculation along imaginary axis (see do_gwa_ia).

`nff_imag_axis 64`

Number of points along imaginary axis at which the screened-interaction will be computed. The grid along imaginary axis is logarithmic, and we typically need only a few points to have converged results. Probably 64 points will provide a sufficient accuracy for any calculation.

`tol_imag_axis 1e-5`

The parameter to set the minimal and maximal frequency of the logarithmic grid along imaginary frequency axis.

`sf_GW_corr_algorithm BLOCK`

This a choice of the algorithms for computing a spectral function of $GW$ corrections. BLOCK and FULLMAT are choices here, BLOCK must be used for production runs.

`gw_corr_res_algorithm XX_BLK`

A choice of algorithm to add residues corrections to the imaginary-axis contribution. Possible choices are XX_BLK, XX_FM and SE. XX_BLK is suitable for production runs. XX_FM is a full matrix (reference) counterart of XX_BLK. SE is slowest option causing the whole self-energy to be computed before the energy correction is calculated.

`g0w0_eigvals_algorithm SF`

The algorithm to compute the $GW$ corrections. Possible choices are SF (i.e. Spectral-Function of $G_0W_0$ corrections) and SE (i.e. Self-Energy which causes a whole self-energy in atomic orbital basis to be computed before a corresponding correction is extracted). SE is obviously slower, while SF option should be suitable to production runs.