TABLE OF CONTENTS


35b-pdos-FeO

DESCRIPTION

This example shows the PWTK capabilities to plot spin-polarized PDOSes and LDOSes. The structure considered is a bulk FeO, taken from PW/examples/example08/.

The meaning of LDOS & PDOS is taken from projwfc.x, i.e.:

EXAMPLE SOURCE FILE

pdos-FeO.pwtk

SOURCE

# the pw.x input data are imported from FeO.pwtk with ::pwtk::import

import FeO.pwtk

# basic input data for projwfc.x

PROJWFC {
    ngauss  = 0
    degauss = 0.01
    DeltaE  = 0.05
}

# the rootname used for files

set name FeO.afm

# calculate Projected DOSes (PDOSes) with the ::pwtk::pdos_run workflow;
# calculated PDOSes and LDOSes will be plotted into a default window terminal (-t win)

pdos_run -scf -nscf {6 6 6} -t win $name

# to replot LDOSes and PDOSes into PDF files, rerun ::pwtk::pdos_run
# with "-t pdf" and ::pwtk::restart activated to avoid QE calculations

restart on
set pdfs [pdos_run -nscf {6 6 6} -t pdf $name]; # the generated PDFs are stored into the 'pdfs' variable

## the generated PDF files can be displayed with ::pwtk::display
#display {*}$pdfs &


# create LDOSes for Fe1, Fe2, and all O atoms with ::pwtk::sumldos
# (N.B. Fe1 = spin-up Fe, Fe2 = spin-down Fe, see FeO.pwtk)
#
# for full explanation of ::pwtk::sumldos options, see ::pwtk::pdos_atm_files
#
# -f ... pattern for the filenames (aka 'filpdos')
# -s ... list of atom symbols

sumldos -f $name -s Fe1 Fe1; # the Fe1-projected DOS was saved to the 'Fe1' file
sumldos -f $name -s Fe2 Fe2; # the Fe2-projected DOS was saved to the 'Fe2' file
sumldos -f $name -s O   O;   # the O-projectd DOS was saved to the 'O' file

# display Fe1, Fe2, and O LDOSes into a window (-t win) and PDF file (-t pdf)
# with ::pwtk::ldos_plot
#
# the Fermi energy is taken from the pw.$name.nscf.out file (i.e. -e pw.$name.nscf.out)
# created by the above ::pwtk::pdos_run workflow

foreach term {win pdf} {
    ldos_plot -xr -10:5 -e pw.$name.nscf.out -t $term {Fe1 Fe2 O} $name.ldos
}


# create Fe1 & Fe2 s- and d-projected PDOSes with ::pwtk::sumpdos
# (these commands are not really needed and are used to get simpler filenames)
#
# for full explanation of ::pwtk::sumpdos options, see ::pwtk::pdos_atm_files
#
# -f ... pattern for the filenames (aka 'filpdos')
# -s ... list of atom symbols
# -l ... list of orbital angular momentum s, p, d

sumpdos -f $name -s Fe1 -l d Fe1-3d
sumpdos -f $name -s Fe2 -l d Fe2-3d
sumpdos -f $name -s Fe1 -l s Fe1-4s
sumpdos -f $name -s Fe2 -l s Fe2-4s

# create PDOSes projected to s- and p-states of all O atoms

sumpdos -f $name -s O -l s O-2s
sumpdos -f $name -s O -l p O-2p

# from the files created above, plot various LDOSes and PDOSes into a
# multiplot with ::pwtk::pdos_multiplot
#
# the specs below illustrate how to specify which PDOSes to plot with
# ::pwtk::pdos_multiplot; one can specify individual orbitals, orbital
# combinations (expressions), predefined orbital combinations (e.g. t2g,
# eg), or "ldos" which stands for the sum of all orbitals of a given
# type (e.g. for p orbitals, ldos = px + py + pz)
#
# t2g and eg are orbital combinations known to PWTK
# (i.e., t2g = dxy + dxz + dyz;  eg = dx2y2 + dz2)

pdos_multiplot -xr -10:5 -e pw.$name.nscf.out -t win {
    {
        Fe1-4s ldos
        Fe1-3d ldos
        
        Fe2-4s ldos
        Fe2-3d ldos
    } {
        Fe1-3d t2g
        Fe1-3d eg
        
        Fe2-3d t2g
        Fe2-3d eg
    } {
        O-2s s
        
        O-2p px
        O-2p py
        O-2p pz
    }
}  $name.pdos