next up previous contents
Next: 5 Shell scripts Up: 2 Detailed description of Previous: 2 Detailed description of   Contents


4 File structure and program flow

(for naming conventions see section 3.1)

1 Flow of input and output files

Each program is started with (at least) one command line argument, e.g.

programX programX.def
in which the arguments specifies a filename, in which FORTRAN I/O units are connected to unix filenames. (See examples at specific programs). These ``def``-files are generated automatically when the standard WIEN2k scripts x, init_lapw or run_lapw are used, but may be tailored by hand for special applications. Using the option
x program -d
a def-file can be created without running the program. In addition each program reads/writes the following files:

a ``master`` input file, which is described below (Section 4.3)
a specific input file, where X labels the program (see def-files for each program in chapter 6).
an output file

The programs of the SCF cycle (see figure 4.1) write the following files:

Figure 4.1: Data flow during a SCF cycle (programX.def, case.struct, case.inX, case.outputX and optional files are omitted)

a file containing only the most significant output (see description below).
error report file, should be empty after successful completion of a program (see chapter 6)

The following tables describe input and output files for the initialization programs nn, sgroup, symmetry, lstart, kgen, dstart (table 4.1), the utility programs tetra, irrep, spaghetti, aim, lapw7, elnes, lapw3, lapw5, xspec, optic, joint, kram, optimize and mini (table 4.2) as well as for a SCF cycle of a non-spin-polarized case (table 4.2). Optional input and output files are used only if present in the respective case subdirectory or requested/generated by an input switch. The connection between FORTRAN units and filenames are defined in the respective programX.def files. The data flow is illustrated in Fig. 4.1.

Table 4.1: Input and output files of init programs
program needs generates
necessary optional necessary optional
NN nn.def case.outputnn case.struct_nn
SGROUP case.struct case.outputsgroup case.struct_sgroup
SYMMETRY symmetry.def case.outputs case.struct_st
case.struct case.in2_st case.in2_st
LSTART lstart.def case.outputst case.rspup
case.struct case.rsp case.rspdn
case.inst case.in0_st case.vsp_st
case.in1_st case.vspdn_st
case.in2_st case.sigma
KGEN kgen.def case.outputkgen
case.struct case.klist
DSTART dstart.def case.outputd
case.struct case.clmsum(up)
case.rsp(up) dstart.error
case.in0 case.in0_std

Input and output files of utility programs

program needs generates
necessary optional necessary optional
SPAGHETTI spaghetti.def case.qtl case.spaghetti_ps case.spaghetti_ene
case.insp case.outputso case.outputsp
case.struct case.irrep
TETRA tetra.def case.outputt case.dos1(2,3)
case.qtl case.dos1ev(1,2,3)
LAPW3 lapw3.def case.output3
case.struct case.rho
case.clmsum case.clmsum
LAPW5 lapw5.def case.sigma case.output5 case.rho.oned
case.struct case.rho
XSPEC xspec.def case.outputx case.coredens case.dos1ev case.xspec
case.vsp case.txspec
case.struct case.m1
case.qtl case.m2
OPTIC optic.def case.outputop
case.struct case.symmat
JOINT joint.def case.outputjoint case.sigma_intra
case.injoint case.joint case.intra
KRAM kram.def case.epsilon case.eloss
case.inkram case.sigmak case.sumrules
OPTIMIZE case.struct case_initial.struct optimize.job case_vol_xxxxx.struct
MINI mini.def case.scf_mini case.outputM case.clmsum_inter
case.inM case.tmpM case.tmpM1
case.finM case.constraint case.struct1
case.scf case.clmhist case.scf_mini1
case.struct .min_hess .minrestart
IRREP case.struct case.outputirrep
case.vector case.irrep
AIM case.struct case.outputaim case.crit
LAPW7 case.struct case.output7
case.vector case.grid
case.in7 case.psink
QTL case.struct case.outputq
case.vector case.qtl

Input and output files of main programs in an SCF cycle
program needs generates
necessary optional necessary optional
LAPW0 lapw0.def case.clmup/dn case.output0 case.r2v
case.struct case.vrespsum/up/dn case.scf0 case.vcoul
case.in0 case.inm case.vsp(up/dn) case.vtotal
case.clmsum case.vns(up/dn)
ORB orb.def case.outputorb case.br1orb
case.struct case.vorb_old case.scforb case.br2orb
case.inorb case.vorb
case.dmat orb.error
LAPW1 lapw1.def case.vns case.output1 case.nsh(s)
case.struct case.vorb case.scf1 case.nmat_only
case.in1 case.vector.old case.vector
LAPWSO lapwso.def case.vorb case.vectorso
case.struct case.outputso
case.inso case.scfso
case.in1 case.energyso
case.vector case.normso
LAPW2 lapw2.def case.kgen case.output2 case.qtl
case.struct case.nsh case.scf2 case.weight
case.in2 case.weight case.clmval case.weigh
case.vector case.weigh case.help03*
case.vsp case.recprlist case.vrespval case.almblm
LAPWDM lapwdm.def case.inso case.outputdm
case.struct case.scfdm
case.indm case.dmat
case.vector lapwdm.error
SUMPARA case.struct case.scf2p case.outputsum
case.clmval case.clmval
LCORE lcore.def case.vns case.outputc case.corewf
case.struct case.scfc case.clmcor
case.vsp lcore.error
After LCORE the case.scfX files are appended to case.scf and the
case.clmsum file is renamed to case.clmsum_old (see run_lapw)
MIXER mixer.def case.clmsum_old case.outputm case.broyd*
case.struct case.clmsc case.scfm
case.inm case.clmcor case.clmsum
case.clmval case.scf mixer.error
After MIXER the file case.scfm is appended to case.scf, so that after an iteration is
completed, the two essential files are case.clmsum and case.scf.

2 Description of general input/output files

In the following section the content of the (non-trivial) output files is described:

Contains the coefficients of the wavefunctions (generated optional by lapw2).
Contains the charge density of previous iterations if you use Broyden's method for mixing. They are removed when using save_lapw. They should be removed by hand when calculational parameters (RKMAX, kmesh, ...) have been changed, or the calculation crashed due to a too large mixing and are restarted by using a new density generated by dstart.
Contains the core charge density (as $\sigma(r) = 4 \pi r^2 \rho(r)$ and has only a spherical part). In spin-polarized calculations two files case.clmcorup and case.clmcordn are used instead.
Contains the semi-core charge density in a 2-window calculation, which is no longer recommended. In spin-polarized calculations two files are used instead: case.clmscup and case.clmscdn.
Contains the total charge density in the lattice harmonics representation and as Fourier coefficients. (The LM=0,0 term is given as $\sigma(r) = 4 \pi r^2 \rho(r)$, the others as $r^2\rho_{LM}(r)$; suitable for generating electron density plots using lapw5 when the TOT-switch is set, (see section 8.6). In spin-polarized calculations two additional files case.clmup and case.clmdn contain the spin densities. Generated by dstart or mixer.
Contains the valence charge density as $r^2\rho_{LM}(r)$; suitable for generating valence electron density plots using lapw5 when the VAL-switch is set, (see 8.6). In spin-polarized calculations two files case.clmvalup and case.clmvaldn are used instead.
Contains the density matrix generated by lapwdm for LDA+U, OP or Hybrid-DFT calculations.
Contains the density of states (states/Ry) and corresponding energy (in Ry at the internal energy scale) generated by tetra. X can be 1-3. Additional files case.dosXev contain the DOS in (states/eV) and the energy in eV with respect to EF.
Contains eigenvalues and partial charges for atom number X.
This file contains the indices of the tetrahedra in terms of the list of k-points. It is used in lapw2 (if EFMOD switch in case.in2 is set to TETRA, see 7.5.3) and in tetra.
This file contains a list of k-points in the first BZ and represents a tetrahedral (special point) mesh. It is generated in kgen and can either be inserted into the case.in1 file or used directly in kgen.
Contains eigenvalues and corresponding partial charges (bandwise) in a form suitable for tetra and band structure plots with ``band character''. The decomposition of these charges is controlled by ISPLIT in case.struct.
Contains the radial basis functions inside spheres (generated optional by lapw2).
Contains the electron densities on a grid in a specified plane generated by lapw5. This file can be used as input for your favorite contour or 3D plotting program.
Contains the atomic densities generated by lstart. They are used by dstart to generate a first crystalline density (case.clmsum).
Contains the exchange potential (in the lattice harmonics representation as $r^2*V_{LM}(r)$ and as Fourier coefficients) in a form suitable for plotting with lapw5.
Contains the last scf-iteration of each individual time (geometry) step during a structural minimization using mini. Thus this file contains a complete history of properties (energy, forces, positions) during a structural minimization.
Contains the atomic densities for those states with a ``P'' in case.inst. Generated in lstart and used for difference densities in lapw5.
A ps file with the energy bandstructure plot generated by spaghetti.
A xmgrace file with the energy bandstructure plot generated by spaghetti.
Contains the Coulomb potential (in the lattice harmonics representation as $r^2*V_{LM}(r)$ and as Fourier coefficients) in a form suitable for plotting with lapw5.
Contains the orbital potential (in Ry) generated by orb for LDA+U or hybrid-DFT calculations in form of a (2l+1,2l+1) matrix.
Contains the total potential (in the lattice harmonics representation as $r^2*V_{LM}(r)$ and as Fourier coefficients) in a form suitable for plotting with lapw5.
Binary file, contains the eigenvalues and eigenvectors of all k-points calculated in lapw1. In spin-polarized calculations two files case.vectorup and case.vectordn are used instead. lapwso generates case.vectorso.
Contains the eigenvalues of all k-points calculated in lapw1. In spin-polarized calculations two files case.vectorup and case.vectordn are used instead. lapwso generates case.energyso.
Contains the non-spherical part of the total potential V. Inside the sphere the radial coefficients of the lattice harmonics representation are listed (for L greater than 0), while for the interstitial region the reanalyzed Fourier coefficients are given (see equ. (2.10)). In spin-polarized calculations two files case.vnsup and case.vnsdn are used instead.
Contains the orbital dependent part of the potential in LDA+U, OP or Hybrid-DFT calculations. Generated in orb, used in lapw1.
Contains the spherical part of the total potential V stored as $r*V$ (thus the first values should be close to $-2*Z$). In spin-polarized calculations two files case.vspup and case.vspdn are used instead.

3 The ``master input`` file case.struct

The file case.struct defines the structure and is the main input file used in all programs. We provide several examples in the subdirectory


If you are using the ``Struct Generator'' from the graphical user interface w2web, you don't have to bother with this file directly! However, the description of the fields of the input mask can be found here.

Note: If you are changing this file manually, please note that this is a formatted file and the proper column positions of the characters are important! Use REPLACE instead of DELETE and INSERT during edit!

We start the description of this file with an abridged example for rutile TiO$_2$ (adding line numbers):

--------------------- top of file ---------------------line #
Titaniumdioxide TiO2 (rutile):  u=0.305                     1
P   LATTICE,NONEQUIV. ATOMS  2                              2
MODE OF CALC=RELA                                           3
 8.6817500 8.6817500 5.5916100 90.       90.       90.      4
ATOM  -1: X= 0.0000000 Y= 0.0000000 Z= 0.0000000            5
          MULT= 2          ISPLIT= 8                        6
ATOM  -1: X= 0.5000000 Y= 0.5000000 Z= 0.5000000                
Titanium   NPT=  781  R0=.000022391 RMT=2.00000000   Z:22.0 7
LOCAL ROT MATRIX:    -.7071068 0.7071068 0.0000000          8
                     0.7071068 0.7071068 0.0000000          9
                     0.0000000 0.0000000 1.0000000         10
ATOM  -2: X= 0.3050000 Y= 0.3050000 Z= 0.0000000
          MULT= 4          ISPLIT= 8
ATOM  -2: X= 0.6950000 Y= 0.6950000 Z= 0.0000000
ATOM  -2: X= 0.8050000 Y= 0.1950000 Z= 0.5000000
ATOM  -2: X= 0.1950000 Y= 0.8050000 Z= 0.5000000
Oxygen     NPT=  781  R0=.000017913 RMT=1.60000000   Z: 8.0
LOCAL ROT MATRIX:    0.0000000 -.7071068 0.7071068
                     0.0000000 0.7071068 0.7071068
                     1.0000000 0.0000000 0.0000000
  16 SYMMETRY OPERATIONS:                                  11
 1 0 0  0.00                                               12
 0 1 0  0.00                                               13
 0 0 1  0.00                                               14
       1                                                   15
 1 0 0  0.00
 0 1 0  0.00
 0 0-1  0.00
 0 1 0  0.50
-1 0 0  0.50
 0 0 1  0.50
------------------ bottom of file ---------------------------

Interpretive comments on this file are as follows.

Table: Lattice type, description and bravais matrix used in WIEN2k
P all primitive lattices except hexagonal [a sin($\gamma$) sin($\beta$), a cos($\gamma$) sin($\beta$), cos($\beta$)], [0, b sin($\alpha$), b cos($\alpha$)], [0, 0, c]
F face-centered [a/2, b/2, 0], [a/2, 0, c/2], [0, b/2, c/2]
B body-centered [a/2, -b/2, c/2],[a/2, b/2, -c/2], [-a/2, b/2, c/2]
CXY C-base-centered (orthorhombic only) [a/2, -b/2, 0], [a/2, b/2, 0], [0, 0, c]
CYZ A-base-centered (orthorhombic only) [a, 0, 0], [0, -b/2, c/2], [0, b/2, c/2]
CXZ B-base-centered (orthorh. and monoclinic symmetry) [a sin($\gamma$)/2, a cos($\gamma$)/2, -c/2], [0, b, 0], [a sin($\gamma$)/2, a cos($\gamma$)/2, c/2]
R rhombohedral [a/$\sqrt3$/2, -a/2, c/3],[a/$\sqrt3$/2, a/2, c/3],[-a/$\sqrt3$, 0, c/3]
H hexagonal [$\sqrt3$a/2, -a/2, 0],[0, a, 0],[0, 0, c]

line 1:
format (A80)
title (compound)
line 2:
format (A4,23X,I3)
lattice type, NAT
lattice type   as defined in table 4.4. For definitions of the triclinic lattice see SRC_nn/dirlat.f
NAT   number of inequivalent atoms in the unit cell
line 3:
format (13X,A4)
RELA   fully relativistic core and scalar relativistic valence
NREL   non-relativistic calculation
line 4:
format (6F10.6)
a, b, c, $\alpha,\beta,\gamma$
a, b, c   unit cell parameters (in a.u., 1 a.u. = 0.529177 Å). In face- or body-centered structures the non-primitive (cubic) lattice constant, for rhombohedral (R) lattices the hexagonal lattice constants must be specified. (The following may help you to convert between hexagonal and rhombohedral specifications:
    $a_{hex} = 2 cos (\frac{\pi- \alpha_{rhomb}}{2} ) a_{rhomb}$
    $c_{hex} = 3 \sqrt{a_{rhomb}^2 - \frac{1}{3} a_{hex}^2 } $
    and (for fcc-like lattices) $a_{rhomb}=a_{cubic}/\sqrt{2} $
$\alpha,\beta,\gamma$   angles between unit axis (if omitted, $90^\circ$ is set as default). Set it only for P and CXZ lattices
line 5:
format (4X,I4,4X,F10.8,3X,F10.8,3X,F10.8)
atom-index, x, y, z
atom-index   running index for inequivalent atoms
    positive in case of cubic symmetry
    negative for non-cubic symmetry
    this is set automatically using symmetry
x,y,z   position of atom in internal units, i.e. as positive fractions of unit cell parameters. ($0\leq x\leq 1$; the positions in the unit cell are consistent with the convention used in the International Tables of Crystallography 64. In face- (body-) centered structures only one of four (two) atoms must be given, eg. in Fm3m position 8c is specified with 0.25, 0.25, 0.25 and .75, 0.75, 0.75). For R lattice use rhombohedral coordinates. (To convert from hexagonal into rhombohedral coordinates use the auxiliary program hex2rhomb, which can be called at a command-line:
    $ \vec X_{ortho} = \vec X_{hex} \left ( \begin{array}{ccc}
0 & 1 & 0 \\
\frac{\sqrt{3}}{2} & \frac{-1}{2} & 0 \\
0 & 0 & 1 \end{array} \right ) $
    $ \vec X_{rhomb} = \vec X_{ortho} \left ( \begin{array}{ccc}
...rt{3}} & \frac{-2}{\sqrt{3}}\\
-1 &1 & 0 \\
1 & 1 & 1 \end{array} \right ) $
line 6:
format (15X,I2,17X,I2)
multiplicity, isplit
multiplicity   number of equivalent atoms of this kind
isplit   this is just an output-option and is used to specify the decomposition of the lm-like charges into irreducible representations, useful for interpretation in case.qtl). This parameter is automatically set by symmetry:
  0 no split of l-like charge
  1 p-z, (p-x, p-y) e.g.:hcp
  2 e-g, t-2g of d-electrons e.g.:cubic
  3 d-z2, (d-xy,d-x2y2), (d-xz,dyz) e.g.:hcp
  4 combining option 1 and 3 e.g.:hcp
  5 all d symmetries separate
  6 all p symmetries separate
  8 combining option 5 and 6
  -2 d-z2, d-x2y2, d-xy, (d-xz,d-yz)
  88 split $lm$ like charges (for telnes)
  99 calculate cross-terms (for telnes)
$»>$: line 5
must now be repeated MULT-1 times for the other positions of each equivalent atom according to the Wyckoff position in the ``International Tables of Crystallography''.
line 7:
format (A10,5X,I5,5X,F10.8,5X,F10.5,5X,F5.2)
name of atom, NPT, R0, RMT, Z
name of atom   Use the chemical symbol. Positions 3-10 for further labeling of nonequivalent atoms (use a number in position 3)
NPT   number of radial mesh points (381 gives a good mesh for LDA calculations, but for GGA twice as many points are recommended; always use an odd number of mesh points!) the radial mesh is given on a logarithmic scale: $r(n)=R_0 * e^{[ (n-1)*DX ]}$
R0   first radial mesh point (typically between 0.0005 and 0.00005, smaller for heavy elements, bigger for light ones; a struct-file generated by w2web will have proper R0 values.)
RMT   atomic sphere radius (muffin-tin radius), can easily be estimated after running nn (see 6.1) and are set automatically with setrmt_lapw see 5.2.6). The following guidelines will be given here: Choose spheres as large as possible as this will save MUCH computer time. But: Use identical radii within a series of calculations (i.e. when you want to compare total energies) -- therefore consider first how close the atoms may possibly come later on (volume or geometry optimization); do NOT make the spheres too different (even when the geometry would permit it), instead use the largest spheres for f-electron atoms, 10-20 % smaller ones for d-elements and again 10-20 % smaller for sp-elements; H is a special case, you may choose it much smaller (e.g. 0.6 and 1.2 for H and C) and systems containing H need a much smaller RKMAX value (3-5) in case.in1.
Z   atomic number
line 8-10:
format (20X,3F10.7)
ROTLOC   local rotation matrix (always in an orthogonal coordinate system). Transforms the global coordinate system (of the unit cell) into the local at the given atomic site as required by point group symmetry (see in the INPUT-Section 7.5.3 of LAPW2). SYMMETRY calculates the point group symmetry and determines ROTLOC automatically. Note, that a proper ROTLOC is required, if the LM values generated by SYMMETRY are used. A more detailed description with several examples is given in the appendix A and sec. 10.3
$»>$: lines 5 thru 10
must be repeated for each inequivalent atom
line 11:
format (I4)
nsym   number of symmetry operations of space group (see International Tables of Crystallography 64)
    If nsym is set to zero, the symmetry operations will be generated automatically by SYMMETRY.
line 12-14:
format (3I2,F10.7)
matrix, tau (as listed in the International Tables of Crystallography 64)
matrix   matrix representation of (space group) symmetry operation
tau   non-primitive translation vector
line 15:
format (I8)
index of symmetry operation specified above
$»>$: lines 12 thru 15
must be repeated for all other symmetry operations
(the complete list is contained in sample inputs)

4 The ``history`` file case.scf

During the self-consistent field (SCF) cycle the essential data are appended to the file case.scf in order to generate a summary of previous iterations. For an easier retrieval of certain quantities the essential lines are labeled with :LABEL:, which can be used to monitor these quantities during self-consistency as explained below. The most important :LABELs are

:ENE total energy (Ry)
:DIS charge distance between last 2 iterations ( $\int \vert \rho_n - \rho_{n-1} \vert dr $). Good convergence criterium.
:FER Fermi energy
:FORxx force on atom xx in mRy/bohr (in the local (for each atom) carthesian coordinate system)
:FGLxx force on atom xx in mRy/bohr (in the global coordinate system of the unit cell (in the same way as the atomic positions are specified))
:DTOxx total difference charge density for atom xx between last 2 iterations
:CTOxx total charge in sphere xx (mixed after MIXER)
:NTOxx total charge in sphere xx (new (not mixed) from LAPW2+LCORE)
:QTLxx partial charges in sphere xx
:EPLxx l-like partial charges and ``mean energies'' in lower (semicore) energy window for atom xx. Used as energy parameters in case.in1 for next iteration
:EPHxx l-like partial charges and ``mean energies'' in higher (valence) energy window for atom xx. Used as energy parameters in case.in1 for next iteration
:EFGxx Electric field gradient (EFG) $V_{zz}$ for atom xx
:ETAxx Asymmetry parameter of EFG for atom xx
:RTOxx Density for atom xx at the nucleus (first radial mesh point)
:VZERO Gives the total, Coulomb and xc-potential at z=0 and z=0.5 (meaningfull only for slab calculations)

To check to which type of calculation a scf file corresponds use:

:POT Exchange-correlation potential used in this calculation
:LAT Lattice parameters in this calculation
:VOL Volume of the unit cell
:POSxx Atomic positions for atom xx (as in case.struct)
:RKM Actual matrix size and resulting RKmax
:NEC normalization check of electronic charge densities. If a significant amount of electrons is missing, one might have core states, whose charge density is not completely confined within the respective atomic sphere. In such a case the corresponding states should be treated as band states (using LOs).

For spin-polarized calculations:

:MMTOT Total spin magnetic moment/cell
:MMIxx Spin magnetic moment of atom xx. Note, that this value depends on RMT.
:CUPxx spin-up charge (mixed) in sphere xx
:CDNxx spin-dn charge (mixed) in sphere xx
:NUPxx spin-up charge (new, from lapw2+lcore) in sphere xx
:NDNxx spin-dn charge (new, from lapw2+lcore) in sphere xx
:ORBxx Orbital magnetic moment of atom xx (needs SO calculations and LAPWDM).
:HFFxx Hyperfine field of atom xx (in kGauss).

One can monitor the energy eigenvalues (listed for the first k-point only), the Fermi-energy or the total energy. Often the electronic charges per atom reflect the convergence. Charge transfer between the various atomic spheres is a typical process during the SCF cycles: large oscillations should be avoided by using a smaller mixing parameter; monotonic changes in one direction suggest a larger mixing parameter.

In spin-polarized calculations the magnetic moment per atomic site is an additional crucial quantity which could be used as convergence criterion.

If a system has electric field gradients and one is interested in that quantity, one should monitor the EFGs, because these are very sensitive quantities.

It is best to monitor several quantities, because often one quantity is converged, while another still changes from iteration to iteration. The script run_lapw has three different convergence criteria built in, namely the total energy, the atomic forces and the charge distance (see 5.1.2, 5.1.3).

We recommend the use of UNIX commands like :

grep :ENE case.scf or use ``Analysis'' from w2web

for monitoring such quantities.

You may define an alias for this (see sec. 11.2), and a csh-script grepline_lapw is also available to get a quantity from several scf-files simultaneously (sec. 5.2.16 and 5.3).

5 Flow of programs

The WIEN2k package consists of several independent programs which are linked via C-SHELL SCRIPTS described below.

The flow and usage of the different programs is illustrated in the following diagram (Fig. 4.2):

Figure: Program flow in WIEN2k
\rotatebox{0}{\epsfig{figure=figs/programflow_w2k, width=14cm}}

The initialization consists of running a series of small auxiliary programs, which generates the inputs for the main programs. One starts in the respective case/ subdirectory and defines the structure in case.struct (see 4.3). The initialization can be invoked by the script init_lapw (see sec. 3.7 and 5.1.2), and consists of running:

a program which lists the nearest neighbor distances up to a specified limit (defined by a distance factor f) and thus helps to determine the atomic sphere radii. In addition it is a very usefull additional check of your case.struct file (equivalency of atoms)
determines the spacegroup of the structure defined in your case.struct file.
generates from a raw case.struct file the space group symmetry operations, determines the point group of the individual atomic sites, generates the LM expansion for the lattice harmonics and determines the local rotation matrices.
generates free atomic densities and determines how the different orbitals are treated in the band structure calculations (i.e. as core or band states, with or without local orbitals,...).
generates a k-mesh in the irreducible part of the BZ.
generates a starting density for the scf cycle by a superposition of atomic densities generated in LSTART.

Then a self-consistency cycle is initiated and repeated until convergence criteria are met (see 3.8 and 5.1.3). This cycle can be invoked with a script run_lapw, and consists of the following steps:

(POTENTIAL) generates potential from density
(BANDS) calculates valence bands (eigenvalues and eigenvectors)
(RHO) computes valence densities from eigenvectors
computes core states and densities
mixes input and output densities

1 Core, semi-core and valence states

In many cases it is desirable to distinguish three types of electronic states, namely core, semi-core and valence states. For example titanium has core ($1s$, $2s$, $2p$), semi-core ($3s$, $3p$) and valence ($3d$, $4s$, $4p$) states. In our definition core states are only those whose charge is entirely confined inside the corresponding atomic sphere. They are deep in energy, e.g., more than 7-10 Ry below the Fermi energy. Semi-core states lie high enough in energy (between about 1 and 7 Ry below the Fermi energy), so that their charge is no longer completely confined inside the atomic sphere, but has a few percent outside the sphere. Valence states are energetically the highest (occupied) states and always have a significant amount of charge outside the spheres.

The energy cut-off specified in lstart during init_lapw (usually -6.0 Ry) defines the separation into core- and band-states (the latter contain both, semicore and valence). If a system has atoms with semi-core states, then the best way to treat them is with ``local orbitals``, an extension of the usual LAPW basis. An input for such a basis set will be generated automatically. (Additional LOs can also be used for valence states which have a strong variation of their radial wavefunctions with energy (e.g. d states in TM compounds) to improve the quality of the basis set, i.e. to go beyond the simple linearization).

2 Spin-polarized calculation

For magnetic systems spin-polarized calculations can be performed. In such a case some steps are done for spin-up and spin-down electrons separately and the script runsp_lapw consists of the following steps:

(POTENTIAL) generates potential from density
LAPW1 -up
(BANDS) calculates valence bands for spin-up electrons
LAPW1 -dn
(BANDS) calculates valence bands for spin-down electrons
LAPW2 -up
(RHO) computes valence densities for spin-up electrons
LAPW2 -dn
(RHO) computes valence densities for spin-down electrons
computes core states and densities for spin-up electrons
computes core states and densities for spin-down electrons
mixes input and output densities

The use of spin-polarized calculations is illustrated for fcc Ni (section 10.2), one of the test cases provided in the WIEN2k package.

3 Fixed-spin-moment (FSM) calculations

Using the script runfsm_lapw -m XX it is possible to constrain the total spin magnetic moment per unit cell to a fixed value XX and thus force a particular ferromagnetic solution (which may not correspond to the equillibrium). This is particularly useful for systems with several metastable (non-) magnetic solutions, where conventional spin-polarized calculation would not converge or the solution may depend on the starting density. Additional SO-interaction is not supported.

Please note, that once runfsm_lapw has finished, only case.vectordn is ok, but case.vectorup is NOT the proper up-spin vector and MUST NOT be used for the calculations of QTLs (and DOS). It must be regenerated by x lapw1 -up (see also the comments for iterative diagonalization in section 5.2.18).

4 Antiferromagnetic (AFM) calculations

Several considerations are necessary, when you want to perform an AFM calculation. Please have also a look into $WIENROOT/SRC_afminput/afminput_test.

runafm_lapw saves you more than a factor of 2 in in computer time, since only spin-up is calculated and in addition the scf-convergence may be MUCH faster. It works also with LDA+U (case.dmatup/dn are also copied), but does NOT work with Hybrid-DFT nor spin-orbit coupling, since this requires the presence of both vector files in the LAPWSO step.

5 Spin-orbit interaction

You can add spin-orbit interaction in LAPWSO (called directly after LAPW1) using a second-variational method with the scalar-relativistic orbitals (from LAPW1) as basis. The number of eigenvalues will double since SO couples spin-up and dn states, so they are no longer separable. In addition, LOs with a ``$p_{1/2}$'' radial basis can be added. (Kunes et al. 2001)

To assist with the generation of the necessary input files and possible changes in symmetry, a script initso_lapw exists. For non-spinpolarized cases nothing particular must be taken into account and SO can be easily applied by running run_lapw -so. It will automatically use the complex version of LAPW2.

However, for spin-polarized cases, the SO interaction may change (lower) the symmetry depending on how you choose the direction of magnetization and care must be taken to get a proper setup. initso_lapw together with symmetso generates the proper symmetry.

Just a few hints what can happen:

The recommended way to include SO in the calculations is to run a regular scf calculation first, save the results, initialize SO and run another scf cycle including SO:

For spin-polarized systems you may want to add the ``-dm'' switch to calculate also the orbital magnetic moment.

6 Orbital potentials

In WIEN2kit is possible to go beyond standard LDA (GGA) and include orbital dependent potentials in methods like LDA+U or the ''Orbital-Polarization'', which are very usefull for strongly correlated systems.

To use these features you need to create input-files for LAPWDM and ORB (case.indm, case.inorb). You may copy a template from SRC_templates, but must modify it according to your needs. In particular you must select for which atoms and which orbitals (usually d-Orbitals of late transition metal atoms or f-orbitals for 4f/5f atoms) you want to add such a potential and also choose the proper U and J values for them. Once this is done, you can include this using the -orb switch. The density matrix (case.dmatup/dn) will be calculated after lapw2 in lapwdm, it will be mixed in mixer (consistently with the ``regular'' charge density) and the orbital dependend potentials will be calculated on orb (after lapw0). Note, you must run spin-polarized in order to use orbital potentials.

If you want to force a non-magnetic solution you can constrain the spin-polarization to zero using runsp_c_lapw.

Without SO, case.vorbup/dn will be considered in LAPW1(c). With SO, it will be applied in LAPWSO (and allows coupling of nondiagonal spin-terms).

7 Exact-exchange and Hybrid functionals for correlated electrons

In WIEN2kit is also possible to go beyond standard LDA (GGA) and include on-site exact-exchange (Hartree-Fock), which is very usefull for strongly correlated systems. The exact-exchange/hybrid methods are implemented only inside the atomic spheres, therefore it is recommended to us them only for localized electrons (see Tran et al. 2006 for details). They will NOT improve gaps in sp-semiconductors.

Examples of implemented functionals include:

In addition to the input files which are necessary for an usual LDA or GGA calculation, the input file case.ineece is necessary to start a calculation. You may copy a template from SRC_templates, but must modify it according to your needs. In particular you must select for which atoms and which orbitals (usually d-Orbitals of late transition metal atoms or f-orbitals for 4f/5f atoms) you want to add such a potential and which type of functional you want to use.

A sample input for calculations with exact exchange is given below.

------------------ top of file: case.ineece -----------
-9.0  2       emin, natorb
1  1  2       1st atom index, nlorb, lorb
2  1  2       2nd atom index, nlorb, lorb
HYBR          HYBR / EECE mode
0.25          fraction of exact exchange
------------------ bottom of file ---------------------

Interpretive comments on this file are as follows:

line 1: free format
emin, natom
  emin lower energy cutoff, to be selected so that the energy of correlated states is larger than emin
  natorb number of atoms for which the exact exchange is calculated
line 2: free format
iatom(i), nlorb(i), (lorb(li,i), li=1,nlorb(i))
  iatom index of atom in struct file
  nlorb number of orbital moments for which exact exchange shall be calculated
  lorb orbital numbers (repeated nlorb-times)
$2^{nd}$ line repeated natorb-times

line 3: free format
  HYBR means that LDA/GGA exchange will be replaced by exact exchange
  EECE means that LDA/GGA exchange-correlation will be replaced by exact exchange
line 4: free format
alpha   This is the fraction of Hartree-Fock exchange (between 0 and 1)

As with LDA+$U$, hybrid functionals can be used only for spin-polarized calculations (runsp_lapw with the switch -eece). runsp_lapw will internally call runeece_lapw, which will create all necessary additional input files (it requires a case.in0 file including the optional IFFT line as generated by init_lapw): case.indm (case.indmc), case.inorb, case.in0eece, case.in2eece (case.in2ceece) and once this is done, calculates in a series of lapw2/lapwdm/lapw0/orb calculations the corresponding orbital dependend potentials.

8 modified Becke-Johnson potential (mBJ) for band gaps

The modified Becke-Johnson exchange potential + LDA-correlation (Tran and Blaha 2009) allows the calculation of band gaps with an accuracy similar to very expensive GW calculations. It is a local approximation to an atomic ``exact-exchange''-potential and a screening term. This is just a XC-potential, not a XC-energy functional, thus $E_{xc}$ is taken from LSDA and the forces cannot be used with this option.

We recommend the following steps to perform such calculations:

In most cases MSEC1 mixing will lead to convergence problems of the scf cycle. One should switch in case.inm to PRATT mixing, first using a smaller mixing factor (eg. 0.2), later increasing it to 0.50.

next up previous contents
Next: 5 Shell scripts Up: 2 Detailed description of Previous: 2 Detailed description of   Contents
pblaha 2011-03-22