Exact exchange¶
THIS PAGE IS PARTLY OUTDATED
Inclusion of the nonlocal Fock operator as an exchangecorreclation functional is an experimental feature in gpaw.
The current implementation lacks the following features:
 Support for periodic systems. Actually, the code won’t complain, but the results have not been tested.
 Support for kpoint sampling. No consideration has been made as to multiple kpoints, or even comlplex wave functions, so this definitely won’t work.
 Forces. Force evaluations when including (a fraction of ) the fock operator in the xcfunctional has been implemented, but has not been tested.
 Speed. Inclusion of Fock exchange is exceedingly slow. The bottleneck is solving the poisson integrals of the Fock operator, which is currently done using an iterative realspace solver with a zero initial guess for the potential at each SCF cycle. This should be optimized.
One way to speed up an exactexchange (or hybrid) calculation is to use the
coarse grid (used for wave functions) instead of the finegrid (used for for
densities) for the Fock potentials. This should give a speedup factor of 8.
This can be specified in the xc
keyword like in this example
coarse.py
Parallelization using domain decomposition is fully supported.
The Fock operator can be used to do the hybrid functional PBE0, and of course,
HartreeFock type EXX. These are accessed by setting the xc
keyword to
PBE0
or EXX
respectively.
The following functionals are suppported:
Functional  Type  Reference 

EXX  Global  
PBE0  Global  [AB98] 
B3LYP  Global  [Ba94] 
HSE03  RSFSR  
HSE06  RSFSR  
CAMYB3LYP  RSFLR  [SZ12] 
CAMYBLYP  RSFLR  [AT08] 
CAMYB3LYP  RSFLR  [SZ12] 
LCYBLYP  RSFLR  [SZ12] 
LCYPBE  RSFLR  [SZ12] 
Here “Global” denotes global hybrids, which use the same percentage of HartreeFock exchange for every point in space, while “RSFSR” and “RSFLR” denotes rangeseparated functionals which mix the fraction of HartreeFock and DFT exchange based on the spatial distance between two points, where for a “RSFSR” the amount of HartreeFock exchange decrease with the distance and increase for a “RSFLR”. See Range separated functionals (RSF) for more detailed information on RSF(LR).
A thesis on the implementation of EXX in the PAW framework, and the specifics of the GPAW project can be seen on the literature page.
A comparison of the atomization energies of the g21 testset calculated in VASP, Gaussian03, and GPAW is shown in the below two figures for the PBE and the PBE0 functional respectively.
In the last figure, the curve marked GPAW (nonself.)
is a nonselfconsistent PBE0 calculation using selfconsistent PBE orbitals.
It should be noted, that the implementation lacks an optimized effective potential. Therefore the unoccupied states utilizing EXX as implemented in GPAW usually approximate (excited) electron affinities. Therefore calculations utilizing HartreeFock exchange are usually a bad basis for the calculation of optical excitations by lrTDDFT. As a remedy, the improved virtual orbitals (IVOs, [HA71]) were implemented. The requested excitation basis can be chosen by the keyword excitation
and the state by excited
where the state is counted from the HOMO downwards:
"""Calculate the excitation energy of NaCl by an RSF using IVOs."""
from ase.build import molecule
from ase.units import Hartree
from gpaw import GPAW, setup_paths
from gpaw.mpi import world
from gpaw.occupations import FermiDirac
from gpaw.test import equal, gen
from gpaw.eigensolvers import RMMDIIS
from gpaw.cluster import Cluster
from gpaw.lrtddft import LrTDDFT
h = 0.3 # Gridspacing
e_singlet = 4.3
e_singlet_lr = 4.3
if setup_paths[0] != '.':
setup_paths.insert(0, '.')
gen('Na', xcname='PBE', scalarrel=True, exx=True, yukawa_gamma=0.40)
gen('Cl', xcname='PBE', scalarrel=True, exx=True, yukawa_gamma=0.40)
c = {'energy': 0.005, 'eigenstates': 1e2, 'density': 1e2}
mol = Cluster(molecule('NaCl'))
mol.minimal_box(5.0, h=h)
calc = GPAW(txt='NaCl.txt', xc='LCYPBE:omega=0.40:excitation=singlet',
eigensolver=RMMDIIS(), h=h, occupations=FermiDirac(width=0.0),
spinpol=False, convergence=c)
mol.set_calculator(calc)
mol.get_potential_energy()
(eps_homo, eps_lumo) = calc.get_homo_lumo()
e_ex = eps_lumo  eps_homo
equal(e_singlet, e_ex, 0.15)
calc.write('NaCl.gpw')
lr = LrTDDFT(calc, txt='LCY_TDDFT_NaCl.log', istart=6, jend=7, nspins=2)
lr.write('LCY_TDDFT_NaCl.ex.gz')
if world.rank == 0:
lr2 = LrTDDFT('LCY_TDDFT_NaCl.ex.gz')
lr2.diagonalize()
ex_lr = lr2[1].get_energy() * Hartree
equal(e_singlet_lr, e_singlet, 0.05)
Support for IVOs in lrTDDFT is done along the work of Berman and Kaldor[BK79]_.
[AB98] 

[Ba94] 

[BK79] 

[HA71] 
