Developers guide to GPAW
XXX Update page to new GPAW style (after guc merge) and mention NewLFCs.
This page goes through the most important equations of a PAW calculation and has references to the code. It is a good idea to have the big picture in front of you when reading this page.
Initial wave functions and densities (todo)
Finding the ground state (todo)
…
Wave functions
The central quantities in a PAW calculation are the pseudo wave-functions, \(\tilde{\psi}_{\sigma\mathbf{k}n}(\mathbf{r})\), from which the all-electron wave functions can be obtained:
where
Here, \(a\) is the atom number, \(\mathbf{R}^a\) is the position of atom number \(a\) and \(\tilde{p}_i^a\), \(\tilde{\phi}_i^a\) and \(\phi_i^a\) are the projector functions, pseudo partial waves, and all-electron partial waves respectively, of the atoms.
See Naming convention for arrays for more information on the naming of
arrays. Note that spos_c
gives the position of the atom in scaled
coordinates in the range [0:1[ (relative to the unit cell).
Note, that in the code, i
refers to \(n\), \(\ell\) and \(m\) quantum
numbers, and j
refers to \(n\) and \(\ell\) only (see
Naming convention for arrays). So, to put an atom-centered function
like \(\tilde{p}_{n\ell m}^a(\mathbf{r})\) on the 3D grid, you need both
the radial part \(\tilde{p}_{n\ell}^a(r)\) (one of the splines in
paw.wfs.setups[a].pt_j
) and a spherical harmonics \(Y_{\ell
m}(\theta,\phi)\). Putting radial functions times spherical harmonics
on a grid is done by the gpaw.lfc.LocalizedFunctionsCollection
class. See also gpaw.setup.Setup
and gpaw.spline.Spline
.
The wave-functions are othonormalized such that the pseudo wave-functions obey the following orthogonality requirements:
, where \(\hat{O}\) is the overlap operator in the PAW formalism. Refer to Orthogonalizing the wave functions for details.
Overlaps
The overlap operator is defined in terms of the PAW overlap corrections:
The constants \(\Delta O_{i_1 i_2}^a\) are found in
paw.wfs.setups[a].dO_ii
(ndarray
). XXX Someone should
rename dO_ii
to dS_ii
or \(\hat{S}\) to \(\hat{O}\).
An approximate inverse overlap operator is similarly defined by:
The inverse overlap coefficients \(\Delta C_{i_1 i_2}^a\) are found in setup.dC_ii
(ndarray
) and are solutions to the system of linear equations:
, such that \(\hat{O}^{\;-1}_\mathrm{approx.}\hat{O} = \hat{I}\) provided
\(\langle\tilde{p}_{i_1}^a|\tilde{p}_{i_2}^{a'}\rangle = \delta_{a a'}
\langle\tilde{p}_{i_1}^a|\tilde{p}_{i_2}^{a}\rangle\). These projector overlaps
\(B_{i_1 i_2}^a = \langle\tilde{p}_{i_1}^a|\tilde{p}_{i_2}^{a}\rangle\)
are likewise found in setup.B_ii
.
Densities
From the pseudo wave-functions, the pseudo electron spin-densities can be constructed (see here):
Here, \(\hat{S}_s\) is one of the \(N_s\) symmetry operators of the system
(see gpaw.symmetry.Symmetry
), \(f_{n\mathbf{k}\sigma}\) are
the occupation numbers (adding up to the number of valence elctrons),
and \(\tilde{n}_c^a(r)\) is the pseudo core density for atom number \(a\).
The all-electron spin-densities are given as:
where
are atom centered expansions, and
is an atomic spin-density matrix, which must be symmetrized the same way as the pseudo electron spin-densities.
formula |
object |
type |
\(\hat{S}_s\) |
|
|
\(\tilde{n}_\sigma\) |
|
|
\(\tilde{n}=\sum_\sigma\tilde{n}_\sigma\) |
|
|
\(\tilde{n}_c^a(r)\) |
|
|
\(\tilde{n}_c^a(\mathbf{r}-\mathbf{R}^a)\) |
|
|
\(f_{\sigma\mathbf{k}n}\) |
|
|
\(D_{\sigma i_1 i_2}^a\) |
|
|
From the all-electron and pseudo electron densities we can now construct corresponding total all-electron and pseudo charge densities:
If \(\mathbb{Z}^a\) is the atomic number of atom number \(a\), then \(Z^a(\mathbf{r})=-\mathbb{Z}^a\delta(\mathbf{r})\) (we count the electrons as positive charge and the protons as negative charge). The compensation charges are given as:
where \(\hat{g}_\ell^a(r)\propto r^\ell\exp(-\alpha^a r^2)\) are Gaussians. The compensation charges should make sure that the two atom centered densities \(\rho^a=\sum_\sigma n_\sigma^a + Z^a\) and \(\tilde{\rho}^a=\sum_\sigma \tilde{n}_\sigma^a + \tilde{Z}^a\) have identical multipole expansions outside the augmentation sphere. This gives the following equation for \(Q_L^a\):
where
formula |
object |
type |
\(\tilde{\rho}\) |
|
|
\(\mathbb{Z}^a\) |
|
|
\(\Delta_{i_1 i_2 L}^a\) |
|
|
\(\Delta_0^a\) |
|
|
\(\hat{g}_\ell^a(r)\) |
|
List of |
\(\hat{g}_L^a(\mathbf{r}-\mathbf{R}^a)\) |
|
|
\(Q_L^a\) |
|
|
The total energy
The total PAW energy is composed of a smooth part evaluated using pseudo quantities on the 3D grid, plus corrections for each atom evaluated on radial grids inside the augmentation spheres: \(E=\tilde{E}+\sum_a(E^a - \tilde{E}^a)\).
In the last two equations, the integrations are limited to inside the augmentation spheres only.
The electrostatic energy part of \(\tilde{E}\) is calculated as
\(\frac{1}{2}\int
d\mathbf{r}\tilde{v}_H(\mathbf{r})\tilde{\rho}(\mathbf{r})\), where the
Hartree potential is found by solving Poissons equation:
\(\nabla^2 \tilde{v}_H(\mathbf{r})=-4\pi\tilde{\rho}(\mathbf{r})\) (see
gpaw.poisson.FDPoissonSolver
).