Setup generation

The generation of setups, starts from a spin-paired atomic all-electron calculation with spherical symmetry.

All-electron calculations for spherical atoms

This is done by the gpaw.atom.all_electron.AllElectron class. The all-electron wave functions are defined as:

\[\phi_{n\ell m}(\mathbf{r}) = \frac{u_{n\ell}(r)}{r} Y_{\ell m}(\hat{\mathbf{r}}),\]

The \(u_{n\ell}(r)\) functions are stored in an attribute u_j of the AllElectron object. The u_j member/attribute is an ndarray with shape (nj, N), where nj is the number of states (1s, 2s, 2p, …) and N is the number of radial grid points.


All-electron calculations can be done with the gpaw-setup program like this:

$ gpaw-setup -a Cu

Try gpaw-setup -h for more options.

class gpaw.atom.all_electron.AllElectron(symbol, xcname='LDA', scalarrel=True, corehole=None, configuration=None, nofiles=True, txt='-', gpernode=150, orbital_free=False, tw_coeff=1.0)[source]

Object for doing an atomic DFT calculation.

Do an atomic DFT calculation.


a = AllElectron('Fe')

Generation of setups

The following parameters define a setup:

name description example
core Froze core '[Ne]'
rcut Cutoff radius/radii for projector functions 1.9
extra Extra non-bound projectors {0: [0.5]}
vbar Zero-potential ('poly', 1.7)
filter Fourier-filtering parameters (0.4, 1.75)
rcutcomp Cutoff radius for compensation charges 1.8

The default (LDA) sodium setup can be generated with the command gpaw-setup Na, which will use default parameters from the file gpaw/atom/ See Exchange-Correlation functional for other functionals.

Using your own setups

The setups you generate must be placed in a directory which is included in the environment variable GPAW_SETUP_PATH in order for GPAW to find them. If you want to use the setups in your local directory, add the following lines to the beginning of your Python script:

from gpaw import setup_paths
setup_paths.insert(0, '.')

You can also override the environment variable GPAW_SETUP_PATH so that it lists the local directory first and the regular entries afterwards.

If you use bash, GPAW_SETUP_PATH can be temporarily modified while you run GPAW with the single command:


or if you are using csh or tcsh, you have to first run setenv and then GPAW:

setenv GPAW_SETUP_PATH .:$GPAW_SETUP_PATH&& gpaw-python