Tutorial XSpectra
Tutorial XSpectra
Outline
1. Introduction on XAS
2. The PAW theory
3. Hands on (I) : Si-K edge in
-quartz SiO2
-quartz SiO2
-quartz SiO2
6. Hands on (III) : Dipolar and Quadrupolar contributions at the Ni-K edge in NiO
7. Summary
(!) = 4 0 ~!
X
i,f
|h
f |O| i i|
(Ef
Ei
~!)
Prefactor
Final one-electron state (atomic state,
molecular orbital, Bloch state, )
Transition operator (electric dipole, ...)
valence
O r
2p
2s
`f = `i 1
XSpectra
What is it ?
XSpectra calculates X-ray absorption dipolar and quadrupolar cross sections in the preedge to near-edge region within the single particle approximation (i.e. mostly K or L1 edges
but also certain L23 edges)
Where can I find XSpectra ?
XSpectra is distributed in the QUANTUM-ESPRESSO package
(http://www.quantum-espresso.org/)
Can I use it ?
XSpectra is distributed under the GNU licence, so you can use it for free. Please remember
to cite the following papers to acknowledge people building the software:
Outline
1. Introduction on XAS
2. The PAW theory
3. Hands on (I) : Si-K edge in
-quartz SiO2
-quartz SiO2
-quartz SiO2
6. Hands on (III) : Dipolar and Quadrupolar contributions at the Ni-K edge in NiO
7. Summary
| i
| i = T | i
mapping
T
T
is linear
differs from identity in the core (augmentation) regions R only :
T =1+
X
R
TR = 1 +
X
R,n
R,n i
| R,n i h
pR,n |
R B
C
RB
X
n
|
pR,n ih R,n | = 1
f |O| i i
= h f |O| i i +
X
R,n
h f |
pR,n ih
R,n |O| i i
X
R,n
h f |
pR,n ih R,n |O| i i
Here, | i i is localized on the site of the absorbing atom R0 so that all matrix elements will be
negligible except for R
= R0
f |O| i i
Using
X
n
h f |O| i i +
X
n
h f |
pR0 ,n ih
R0 ,n |O| i i
X
n
h f |
pR0 ,n ih R0 ,n |O| i i
|
pR,n ih R,n | = 1 , the first and last terms cancel, so that :
f |O| i i
X
n
R0 i =
Defining |'
h f |
pR0 ,n ih
X
n
|
pR0 ,n ih
R0 ,n |O| i i
R0 ,n |O| i i,
(!) = 4 0 ~!
X
f
Ei
~!)
|'R0 i =
X
n
|
pR0 ,n ih
R0 ,n |O| i i
The sum runs over a complete set, i.e. an infinite number of projectors !!
In practice a finite number of projectors is enough :
1 projector/channel (`)
generally yields wrong intensities
wrong dipole/quadrupole ratio
2 projectors/channel (`)
correct intensities in the near edge region (~ 50 eV above the edge, in most of the cases)
need to be linearly independent (i.e. , span a 2 x 2 subspace)
Finally, we need the core WF without the core-hole and the AE partial-waves (from PP
R0 i
generation) to fully determine |'
Outline
1. Introduction on XAS
2. The PAW theory
3. Hands on (I) : Si-K edge in
-quartz SiO2
-quartz SiO2
-quartz SiO2
6. Hands on (III) : Dipolar and Quadrupolar contributions at the Ni-K edge in NiO
7. Summary
Practical details
cp -r ~/TutorialXSpectra /scratch/
cd /scratch/TutorialXSpectra/
Directory structure:
./pseudo/
./PPgeneration/
./SiO2
./SiO2h
./SiOsupercell
./NiO
./*/outdir/
tmp output
./solutions/
./references/
1s core-state
unoccupied p states
We only need a PP with two p projectors. We add the s projectors as an exercise even if they
are not required
Projector
channel
First projector
Energy
Second projector
Energy
optional
3s state
4s state
mandatory
3p state
4p state
&input
title='Si',
zed=14.,
rel=1,
config=1s2 2s2 2p6 3s2 3p2 3d-2 4s0 4p0',
iswitch=3,
dft='PBE
/
Atomic number
&input
title='Si',
zed=14.,
rel=1,
config=1s2 2s2 2p6 3s2 3p2 3d-2 4s0 4p0',
iswitch=3,
dft='PBE
/
&input
title='Si',
zed=14.,
rel=1,
config=1s2 2s2 2p6 3s2 3p2 3d-2 4s0 4p0',
iswitch=3,
dft='PBE
/
0 2.00 0.00
0 0.00 6.00
1 2.00 0.00
1 0.00 6.00
2 -2.00 -0.30
2.00
1.40
2.00
1.40
2.00
2.10
2.10
2.10
2.10
2.00
0.0
0.0
0.0
0.0
0.0
Number of projectors
0
0
1
1
2.00
0.00
2.00
0.00
0.00
0.00
0.00
4.00
2.00
2.00
1.40
1.40
2.10
2.10
2.10
2.10
0.0
0.0
0.0
0.0
0 2.00 0.00
0 0.00 6.00
1 2.00 0.00
1 0.00 6.00
2 -2.00 -0.30
2.00
1.40
2.00
1.40
2.00
2.10
2.10
2.10
2.10
2.00
0.0
0.0
0.0
0.0
0.0
Generation parameters
0
0
1
1
2.00
2.00
1.40
1.40
2.10
2.10
2.10
2.10
0.0
0.0
0.0
0.0
Projectors parameters
2.00
0.00
2.00
0.00
0.00
0.00
0.00
4.00
Inclusion of a core-hole
valence
2p
2s
1s
Including a core-hole in a PP
$ cp Si.ld1.in
Sih.ld1.in
$ gedit Sih.ld1.in
Changes to make
title=Sih
config=1s1 2s2 2p6 3s2 3p2 3d-2 4s0 4p0',
file_pseudopw='Sih.pbe-us_gipaw.UPF',
Including of a core-hole in a PP
Simply run the following shell script (located in the XSpectra/tools directory in
the Quantum Espresso distribution) :
$ cd ../pseudo
$ /scratch/XSpectra/tools/upf2plotcore.sh < Si.pbemt_gipaw.UPF > Si.wfc
The pseudopotential without a core-hole should be used : there is no corehole in the initial state.
The .wfc file contains the radial part of | i i obtained from an atomic AE SCF
calculation, it is therefore an AE wave-function. This WF is required by XSpectra.
Trigonal Structure :
Space Group: P3221
a = b = 4.9138,
c = 5.4052
= = 90,
=120
9 atoms in the unit cell :
3 Si
Si
O
6O
x
3a 0.4670
6c 0.4131
y
z
0.0000 0.0000
0.2677 0.1189
/
ATOMIC_SPECIES
Si1
28.086
Si.pbe-us_gipaw.UPF
Si
28.086
Si.pbe-us_gipaw.UPF
O
15.9994
O.pbe-rrkjus.UPF
Outline
1. Introduction on XAS
2. The PAW theory
3. Hands on (I) : Si-K edge in
-quartz SiO2
-quartz SiO2
-quartz SiO2
6. Hands on (III) : Dipolar and Quadrupolar contributions at the Ni-K edge in NiO
7. Summary
(!) = 4 0 ~!
X
f
Ei
~!)
The direct, brute-force, sum over the unoccupied states f is very expensive. Instead, we use
a recursive method proposed originally by Haydock, Heine and Kelly. The cross-section can be
re-expressed as :
2
(!) = 4 0 ~!
X
f
h'R0 | f i (Ef
Ei
~!) h f |'R0 i
h
i X
1
Im G(E)
=
| f i (Ef
+i )
H
associated
E) h f |
We therefore simply re-write the cross-section under the form of the imaginary part of a
matrix element :
(!) =
+i )
H
|'R0 i
Note : Even under this form (after the sum over f is removed) the numerical task remains very large as the
calculation of h'R0 |(E H + i ) 1 |'R0 i requires a matrix inversion for each energy E.
0i
b1 |u1 i = H|u
0i
a0 |u0 i with a0 = hu0 |H|u
ii
bi+1 |ui+1 i = H|u
ai |ui i
bi |ui
1i
i i = hui |H|u
i 1i
i i and bi = hui 1 |H|u
with ai = hui |H|u
B
B
B
B
H=B
B
B
B
@
a0
b1
0
0
...
0
0
b1
a1
b2
0
...
0
0
0
b2
a2
b3
...
0
0
0
0
b3
a3
...
0
0
0
0
0
b4
...
0
0
...
...
...
...
...
...
...
0
0
0
0
...
bn 1
0
0
0
0
0
...
an 1
bn
0
0
0
0
...
bn
an
1
C
C
C
C
C
C
C
C
A
+i )
H
Outline
1. Introduction on XAS
2. The PAW theory
3. Hands on (I) : Si-K edge in
-quartz SiO2
-quartz SiO2
-quartz SiO2
6. Hands on (III) : Dipolar and Quadrupolar contributions at the Ni-K edge in NiO
7. Summary
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
Type of calculation :
xanes_dipole
O = r
xanes_quadrupole
O=
1
( r) (k r)
2
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&input_xspectra
calculation='xanes_dipole'
edge='K'
prefix='SiO2',
outdir='./outdir/',
xonly_plot=.false.,
xiabs=1,
xepsilon(1)=0.0,
xepsilon(2)=0.0,
xepsilon(3)=1.0,
xcoordcrys=.true.
x_save_file='SiO2_9at.xanes.sav',
xniter=2000,
xcheck_conv=50,
xerror=0.001,
/
&plot
xnepoint=1000,
xemin=-10.0,
xemax=50.0,
gamma_mode='constant'
xgamma=0.9,
cut_occ_states=.true.,
terminator=.true.,
/
&plot
xnepoint=1000,
xemin=-10.0,
xemax=50.0,
gamma_mode='constant'
xgamma=0.9,
cut_occ_states=.true.,
terminator=.true.,
/
&plot
xnepoint=1000,
xemin=-10.0,
xemax=50.0,
gamma_mode='constant'
xgamma=0.9,
cut_occ_states=.true.,
terminator=.true.,
/
&plot
xnepoint=1000,
xemin=-10.0,
xemax=50.0,
gamma_mode='constant'
xgamma=0.9,
cut_occ_states=.true.,
terminator=.true.,
/
&pseudos
filecore='Si.wfc',
/
&cut_occ
cut_desmooth=0.1,
/
4 4 4 0 0 0
&pseudos
filecore='Si.wfc',
/
&cut_occ
cut_desmooth=0.1,
/
4 4 4 0 0 0
- SiO2.xspectra.out
- xanes.dat
- SiO2.xanes.sav
$ mv xanes.dat SiO2.xanes.dat
$ gnuplot
> plot SiO2.xanes.dat
Rename
prefix='SiO2h'
2) Add in nameliste system:
tot_charge=+1
&system
ecutrho = 150.0
tot_charge=+1
/
3) Change the name of the pseudopotential file for the absorbing atom:
2 changes to make
1) Change prefix:
prefix='SiO2h'
2) Change .sav file name:
x_save_file='SiO2h.xanes.sav',!
conduction
valence
2p
2p
2s
1s
2s
1s
Supercell calculations
Due to periodic boundary conditions, we have to avoid spurious interaction of the excited
atom with its periodically repeated images.
Weak interaction
Large interaction
2x2
supercell
$ mv SiO2h.scf.in SiO2_super.scf.in
$ gedit SiO2_super.scf.in
1) Remove the atomic positions
Si1 0.47000000000000 0.00000000000000 0.000000000000000
Si 0.00000000000000 0.47000000000000 0.666666666666666
Si -0.47000000000000 -0.47000000000000 0.333333333333333
prefix='SiO2_super'
2) Change the number of atoms (9 atoms/unit cell x 2x2x2 cells)
nat=72
3) Change the lattice parameters:
A = 9.8276
B = 10.8104
4) Divide the number of k points:
K_POINTS automatic
1 1 1 0 0 0
$ $BIN/pw.x < SiO2_super.scf.in > SiO2_super.scf.out &
3 changes to make
1) Change prefix:
prefix='SiO2_super'
2) Change .sav file name:
x_save_file='SiO2_super.xanes.sav',
3) Divide the number of k-points:
2 2 2 0 0 0
$ $BIN/xspectra.x < SiO2_super.xspectra.in >
SiO2_super.xspectra.out &
$ mv xanes.dat SiO2_super.xanes.dat
$ gnuplot
> plot SiO2_super.xanes.dat
it is a dichroic compound !
The cross-section along the threefold symmetry axis (
section in the perpendicular direction ( ?)
|| )
= (1, 0, 0)
, any direction perpendicular to c is fine, i.e.
xepsilon(1)=1.0,
xepsilon(2)=0.0,
xepsilon(3)=0.0,
x_save_file='SiO2_super_perp.xanes.sav',
$ mv xanes.dat SiO2_super_perp.xanes.dat
$ gnuplot XNLD
-quartz dichroic signal @ the Si-K edge :
2nd example:
Ni K-edge in NiO
nspin=2,
starting_magnetization(1)=1.0,
starting_magnetization(2)=-1.0,
tot_magnetization = 0,
/
ATOMIC_SPECIES
Ni1 58.6934
Ni_PBE_TM_2pj.UPF
Ni2 58.6934
Ni_PBE_TM_2pj.UPF
O 15.9994
O_PBE_TM.UPF
ATOMIC_POSITIONS crystal
Ni1 0.0000000000 0.0000000000 0.0000000000
Ni2 -.5000000000 1.5000000000 -.5000000000
spin-polarized calculation
nspin=2,
starting_magnetization(1)=1.0,
starting_magnetization(2)=-1.0,
tot_magnetization = 0,
/
ATOMIC_SPECIES
Ni1 58.6934
Ni_PBE_TM_2pj.UPF
Ni2 58.6934
Ni_PBE_TM_2pj.UPF
O 15.9994
O_PBE_TM.UPF
ATOMIC_POSITIONS crystal
Ni1 0.0000000000 0.0000000000 0.0000000000
Ni2 -.5000000000 1.5000000000 -.5000000000
nspin=2,
starting_magnetization(1)=1.0,
two Ni atoms
starting_magnetization(2)=-1.0,
antiferromagnetically-coupled
tot_magnetization = 0,
/
ATOMIC_SPECIES
Ni1 58.6934
Ni_PBE_TM_2pj.UPF
Ni2 58.6934
Ni_PBE_TM_2pj.UPF
O 15.9994
O_PBE_TM.UPF
ATOMIC_POSITIONS crystal
Ni1 0.0000000000 0.0000000000 0.0000000000
Ni2 -.5000000000 1.5000000000 -.5000000000
lda_plus_u=.true.,
Hubbard_U(1)=7.6,
DFT + U
Hubbard_U(2)=7.6,
Hubbard_U(i): U parameter (eV) for species i
/
ATOMIC_SPECIES
Ni1 58.6934
Ni_PBE_TM_2pj.UPF
Ni2 58.6934
Ni_PBE_TM_2pj.UPF
O 15.9994
O_PBE_TM.UPF
In xanes.dat :
column 1
Total
column 2
Spin up
column 3
Spin down
$ cp NiO.xspectra_dip.in NiO.xspectra_qua.in
$ gedit NiO.xspectra_qua.in
2 changes to make
1) Change calculation :
calculation='xanes_quadrupole',
2) Add xkvec :
xkvec(1)= 1.0,
xkvec(2)= 1.0,
xkvec(3)=-1.0,
k?
Total
column 2
Spin up
column 3
Spin down
XSpectra : summary
XSpectra now :
calculates any K, L1, L23 edges (for which a single-particle description is appropriate !)
calculates electric dipole (K and L edges) and electric quadrupole (K and L1 edges)
very efficient due to the Lanczos algorithm + continued fraction approach
supports all standard DFT functionals available in Quantum Espresso (PZ,PBE,PZ+U,PBE+U)
supports both ultrasoft and norm conserving pseudopotentials
the pseudopotential of the absorbing species must contain information on the core states
(GIPAW)
the all electron reconstruction is performed within GIPAW
a supercell is needed to model the core hole (periodic boundary conditions)
Not yet supported :
spin-orbit coupling
circular polarization, XMCD
hybrid functionals (B3LYP, PBE0, ...)
B
B
B
B
H=B
B
B
B
@
a0
b1
0
0
...
0
0
b1
a1
b2
0
...
0
0
0
b2
a2
b3
...
0
0
0
0
b3
a3
...
0
0
0
0
0
b4
...
0
0
...
...
...
...
...
...
...
0
0
0
0
...
bn 1
0
I)
0
0
0
0
...
an 1
bn
0
0
0
0
...
bn
an
|u0 i with
1
C
C
C
C
C
C
C
C
A
a scalar
I) |un i = (an
(H
I) |un
1i
)|un i + bn |un
= bn |un i + (an
(H
I) |un
1i
bn
an
|un i
1i
)|un
1i
an
+ bn
1 |un 2 i
b2n
an
|un
1i
+ bn
1 |un 2 i
(H
I) |un
2i
= bn
1 |un 1 i
to eliminate |un 1 i :
0
B
I) @|un
2i
an
bn
+ (an
b2n
an
)|un
|un
2i
+ bn
bn
1i
an
2 |un 3 i
C B
|un i A = @an
b2n
an
b2n
an
C
A |un
+bn
Continuing this way, we get the expression of |u0 i as a function of the |uk is :
0
(H
I) |u0 i
B
B
B
B
B
B
! B
B
n
X
B
k |uk i = B
Ba 0
B
k=1
B
B
B
B
B
B
@
b21
b22
a1
b23
a2
..
an
an
.
b2n
an
2i
2 |un 3 i
C
C
C
C
C
C
C
C
C
C |u0 i
C
C
C
C
C
C
C
C
A
I)
|u0 i =
I)
, we obtain :
1
b21
a0
a1
b22
b23
a2
..
an
an
.
b2n
an