GWCalculator

class GWCalculator(ground_state_calculator, energy_cutoff=None, tau_precision_parameter=None, abc_tolerance=None, polarizability_compression_parameter=None, w_compression_parameter=None, include_gamma_point=None)

Class for representing GW calculators.

Parameters:
  • ground_state_calculator (LCAOCalculator) – The DFT calculator that is used to generate the Kohn-Sham states on which the G0W0 algorithm is based.

  • energy_cutoff (PhysicalQuantity of type energy.) – The energy cutoff decides how many bands will be included in the Greens functions of the GW calculation. At the gamma point the Kohn-Sham energy spectrum will be checked, and all bands that have an energy above the Fermi level that is below the energy cutoff will be included.
    Default: 50.0 eV

  • tau_precision_parameter (float) – The parameter that decided how many time points will be taken. Given a (e_max : e_min) energy range, we have a minimal and maximal number of points we can include. If the precision parameters is 1 it will take the maximum, if it is 0 it will take the minimal. If in between we will take the closest integer that respects this fractional value.
    Default: 1.0

  • abc_tolerance (float) – If the norm of certain atom-pair IJ blocks in the auxiliary basis coefficients is below this threshold we will throw it away and reduce the ‘overlap_sparsity’.
    Default: 1.0e-4

  • polarizability_compression_parameter (float) – This parameter determines how aggresively the polarizability will be compressed, to save memory.
    Default: 1.0e-7

  • w_compression_parameter (float) – This parameter determines how aggresively the screened coulomb potential, W, will be compressed, to save memory.
    Default: 1.0e-5

  • include_gamma_point (boolean) – If this is true, we include the gamma point with a gamma point correction. If False, we skip the Gamma point. This can be done if you want to perform an extrapolation to infinite kpoint sampling or if you want to verify that the gamma point correction is correct.
    Default: True

abcTolerance()
Returns:

The abc tolerance: If the norm of certain pair IJ blocks in the auxiliary basis coefficients is below this threshold, the ‘abc_tolerance’, we will throw it away and reduce the ‘overlap_sparsity’.

Return type:

float

energyCutoff()
Returns:

The energy cutoff decides how many bands will be included in the Greens functions of the GW calculation. At the Gamma point the Kohn-Sham energy spectrum will be checked, and all bands that have an energy above the Fermi level that is below the energy cutoff will be included.

Return type:

PhysicalQuantity of type energy.

groundStateCalculator()
Returns:

The DFT calculator used to construct the zero order KS states.

Return type:

LCAOCalculator

includeGammaPoint()
Returns:

A bool, which if true, means we skip the gamma point and use no gamma point correction. This can be done if you want to perform an extrapolation to infinite kpoint sampling or if you want to verify that the gamma point correction is correct.

classmethod isADMMSupported(is_hybrid, use_admm)

Check for ADMM. The ADMM method cannot be combined with G0W0 for now.

classmethod isMGGASupported(is_mgga)

Check for ADMM. The ADMM method cannot be combined with G0W0 for now.

classmethod isPseudoPotentialTypeSupported(is_paw)

Check if the pseudo-potential, for now GW calculations can only be done with normconserving.

classmethod isSpinTypeSupported(spin_type)

Check if the spin type is supported.

nlinfo()
Returns:

A dict with info about this calculator.

Return type:

dict

numberOfOccupiedBands()
Returns:

The number of bands below the fermi level in the DFT calculation. Set only after ‘update’ has been called.

numericalAccuracyParameters()
Returns:

The NumericalAccuracyParameters object used for the DFT calculation.

Return type:

NumericalAccuracyParameters

polarizabilityCompressionParameter()
Returns:

This parameter determines how aggresively the polarizability will be compressed, to save memory.

Return type:

float

classmethod supportedCalculatorTypes()

Return a list of supported calculators.

Returns:

List of supported calculators.

Return type:

list

tauPrecisionParameter()
Returns:

The parameter that decided how many time points will be taken. Given a (e_max : e_min) energy range, we have a minimal and maximal number of points we can include. If the precision parameters is 1 it will take the maximum, if it is 0 it will take the minimal. If in between we will take the closest integer that respects this fractional value.

Return type:

float

uniqueString()

Return a unique string representing the state of the object.

upgrade(configuration)

Function that calls upgrade on the underlying ground_state_calculator object.

wCompressionParameter()
Returns:

This parameter determines how aggresively the screened coulomb potential will be compressed, to save memory.

Return type:

float

Usage Examples

To run a GW calculation one first has to construct a regular LCAOCalculator, which is then set on a GWCalculator object:

lcao_calculator = LCAOCalculator(
    basis_set=BasisGGAPseudoDojo.High,
    exchange_correlation=HybridGGA.HSE06)

gw_calculator = GWCalculator(
    lcao_calculator,
    energy_cutoff=50*eV,
    polarizability_compression_parameter=1.0e-07,
    w_compression_parameter=1.0e-05)

bulk_configuration.setCalculator(gw_calculator)
bulk_configuration.update()

Once the update function is called, the self energies are calculated and stored on the GWCalculator object. To get the bandstructure or density of states we just call the standard analysis objects:

bandstructure = Bandstructure(bulk_configuration, bands_above_fermi_level=4)
nlsave("gw_bandstructure.hdf5", bandstructure)

pdos= ProjectedDensityOfStates(
    bulk_configuration,
    MonkhorstPackGrid(21,21,21),
    projections=ProjectOnShellsBySite,
    bands_above_fermi_level=4)
nlsave("gw_pdos.hdf5", pdos)

For GW calculations it is important to have a good basis set. To get a basis set the matches plane-wave accuracy we have developed the BasisSetOptimizer class. For a reference system a plane wave calculation is performed and the LCAO basis set is optimized to match the plane wave calculation. The basis set is then stored in a file:

basis_set_optimizer = BasisSetOptimizer(
    bulk_configuration,
    orbitals_per_shell_map={Silicon: [6,6,5,4]},
    energy_cutoff=10*eV,
    tolerance=1.0e-5)

opt_basis_set = basis_set_optimizer.optimize()
nlsave("opt_basis_set.hdf5", opt_basis_set)

The bulk_configuration object that is passed into the BasisSetOptimizer object should have the updated plane-wave calculator attached.

The saved basis set can then be used in the GW calculation by setting it on the LCAOCalculator object:

opt_basis_set = nlread("opt_basis_set.hdf5")[0]
lcao_calculator = LCAOCalculator(
    basis_set=opt_basis_set,
    exchange_correlation=HybridGGA.HSE06)

gw_calculator = GWCalculator(
    lcao_calculator,
    energy_cutoff=50*eV,
    polarizability_compression_parameter=1.0e-07,
    w_compression_parameter=1.0e-05)

bulk_configuration.setCalculator(gw_calculator)
bulk_configuration.update()

More detailed information about the GW implementation can be found in the G0W0 technical notes.