Metnum Ex1
Metnum Ex1
Metnum Ex1
Computer exercises
8.2 Atoms
Software Installation Unpack the Quantum ESPRESSO distribution. The code will
be created into a subdirectory espresso-x.y.z/ , where x.y.z is the version number. In
the following, the path (relative or absolute) to the directory containing the executables
will be referred to as $espresso dir.
Move into $espresso dir. A package for atomic calculations and for pseudo-potential
generation can be found in subdirectory atomic/; the relative tests, examples, and doc-
umentation are in atomic doc/. Run the commands ./configure; make ld1: if every-
thing goes well, an executable is produced in bin/ld1.x.
How to run the code The atomic code is quite complex and its input has a lot of
options. Let us start from the simple case of a self-consistent calculation for atoms. The
essential data is contained in a namelist &input:
&input
atom=atomic symbol,
config=electronic configuration,
dft=density-functional theory identifier
/
50
known Perdew-Zunger formula for LDA; or a gradient-corrected functional like PW91
(Perdew-Wang), BP (Becke-Perdew). PBE (Perdew, Becke and Ernzerhof), BLYP, ...
More details and more optional variables are described in file atomic doc/INPUT LD1.txt
(there is also a html version of this file, readable with a browser). An example:
&input
atom=Si,
config=[Ne] 3s2 3p2,
dft=PZ
/
For a short description of numerical methods used in atomic calculations, see Appendix
A of atomic doc/pseudo-gen.pdf.
Atomic energies As a first application, you can calculate atomic energies with various
DFT approximations for a few light atoms and compare them with results known from
the literature, for instance: table I of the paper by Dal Corso et al. (1996), and table IV
of Jones and Gunnarsson (1989). How much is the effect of spin polarization (lsd=1)?
Verify also the size of relativistic effects by comparing the nonrelativistic (rel=0) to scalar-
relativistic (rel=1) and fully relativistic (rel=2) cases (in the latter case do not specify
lsd=1).
You may also try to reproduce data on ionization energies and transfer energies (figs.8-
11 of Jones and Gunnarsson) by performing calculations with different electronic configu-
rations. What should you do in order to calculate electron affinities of atoms? why doesnt
it work ?
Plot of the Kohn-Sham orbitals Kohn-Sham atomic orbitals are written to a file
with name "prefix".wfc. If variable prefix is not specified, Kohn-Sham orbitals are
written to file ld1.wfc. This contains up to 7 columns of numbers: the first column
contains the radial grid (in a.u.), the following up to the last 6 wavefunctions in reversed
order with respect to input (in case of doubt, see the first line of the file). These functions
can be plotted using any plotting package, for instance gnuplot: type gnuplot, then at
the prompt (gnuplot >) type commands like:
gnuplot > plot [xmin:xmax] [ymin:ymax] ld1.wfc using 1:2 with lines
to plot a y(x) line using columns 1 and 2 of file ld1.wfc. The specification of [xmin:xmax]
[ymin:ymax] is optional. To plot points representing columns 1 and 3 over the existing
graph:
Note that you cannot specify [xmin:xmax] [ymin:ymax] with replot. Type quit to
leave gnuplot. For a better plot, use the following script plotwfc.gnu that writes to
printable file gnuplot.ps:
51
set key off
set xrange [0:5]
set label "Si LDA" at 4.0,2.5
set xlabel "a.u." ; set ylabel "{/Symbol y}_{nl} (r)"
set label "1s" at 0.2,2.2
set label "2s" at 0.8,-1.3
set label "2p" at 0.6,1.3
set label "3s" at 2.0,0.9
set label "3p" at 2.7,-0.7
plot "ld1.wfc" u 1:2 w l lw 2
replot "ld1.wfc" u 1:3 w l lw 2
replot "ld1.wfc" u 1:4 w l lw 2
replot "ld1.wfc" u 1:5 w l lw 2
replot "ld1.wfc" u 1:6 w l lw 2
Remove or comment the three top lines to see the plot at the terminal. The script should
be run from inside gnuplot as
Note that what is plotted is rRnl (r), that is, r times the radial part of the wavefunction
having n as principal quantum number and l as angular momentum number. Do they look
like you expected ?
52