TABLE OF CONTENTS
35c-pdos-CORh
DESCRIPTION
This example shows how to calculate and plot PDOSes and LDOSes. The structure considered is a two-layer slab of CO/Rh(100)-c(2x2).
The meaning of LDOS & PDOS is taken from projwfc.x, i.e.:
- PDOS = DOS projected to a given atomic orbital
- LDOS = \sum_i PDOS_i, where PDOS_i are orbital-projected DOSes in the pdos_atm file, e.g., LDOS(p) = PDOS(px) + PDOS(py) + PDOS(pz)
EXAMPLE SOURCE FILE
SOURCE
# the pw.x input data are imported from CORh.pwtk with ::pwtk::import import CORh.pwtk # the rootname used for the I/O files set name CO-Rh100-c2x2-2L # let's use the ::pwtk::relax_fromXSF workflow to load the structure # from the XSF file and perform structural relaxation # # let's fix the bottom-layer atoms of Rh(100)-c2x2, i.e., the two last atoms (-fix_last 2) relax_fromXSF pw.x -cell -fix_last 2 $name.xsf # basic input data for projwfc.x PROJWFC { ngauss = 0 degauss = 0.01 DeltaE = 0.05 } ## this makes the Gnuplot plotting window alive for 3 seconds #::pwtk::gp::pause 3 # the -nscf {8 8 1} option requests the NSCF pw.x calculation with a # denser non-shifted 8x8x1 k-mesh; # let's PDOSes into a default window terminal (-t win) pdos_run -nscf {8 8 1} -t win $name # let's also plot all LDOSes and PDOSes into PDF (-t pdf) using # ::pwtk::ldos_fullplot & ::pwtk::pdos_fullplot # # 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 ldos_fullplot -e pw.$name.nscf.out -t pdf $name pdos_fullplot -e pw.$name.nscf.out -t pdf $name # ------------------------ # plotting specific LDOSes # ------------------------ # let's plot the LDOSes of CO and the Rh atom to which CO binds are; # the respective atom numbers are 1, 2, 4 for O, C, Rh, respectively (see # CO-Rh100-c2x2-2L.xsf) # # for the explanation of ::pwtk::sumldos options, see ::pwtk::pdos_atm_files # # -f ... pattern for the filenames (aka 'filpdos') # -s ... list of atom symbols # -n ... list of atom numbers sumldos -f $name -s {C O} CO; # the CO-projectd DOS was saved to the 'CO' file sumldos -f $name -n 4 Rh4; # the DOS projected to Rh atom No.4 was saved to the 'Rh4' file # ::pwtk::ldos_plot displays LDOSes with a "single plot"; # let's plot into a default window terminal (-t win) ldos_plot -e pw.$name.nscf.out -t win {CO Rh4} CO-Rh # let's also plot into a PDF file (-t pdf) ldos_plot -e pw.$name.nscf.out -t pdf {CO Rh4} CO-Rh # let's also plot each LDOS into a separate plot as well as together with ::pwtk::ldos_multiplot ldos_multiplot -e pw.$name.nscf.out -t win {CO Rh4 {CO Rh4}} CO-Rh_multi ldos_multiplot -e pw.$name.nscf.out -t pdf {CO Rh4 {CO Rh4}} CO-Rh_multi # ------------------------ # plotting specific PDOSes # ------------------------ # we can define custom orbital combinations with ::pwtk::orbitalGroup orbitalGroup pā {px + py}; # p orbitals perpendicular to the surface normal and CO axis orbitalGroup pā„ pz; # p orbital along the surface normal and CO axis orbitalGroup dā {dx2-y2 + dxy}; # d orbitals perpendicular to the surface normal and CO axis orbitalGroup dā„ dz2; # d orbital along the surface normal and CO axis # CO and the Rh atoms to which CO binds are atoms 1, 2, 4 for # O, C, Rh, respectively (see CO-Rh100-c2x2-2L.xsf) # # we do not really need ::pwtk::sumpdos here; it is used to have # simpler and more readable filenames; for full explanation of # ::pwtk::sumpdos options, see ::pwtk::pdos_atm_files # # -f ... pattern for the filenames (aka 'filpdos') # -n ... list of atom numbers # -l ... list of orbital angular momentum s, p, d sumpdos -f $name -n 1 -l s O-2s sumpdos -f $name -n 1 -l p O-2p sumpdos -f $name -n 2 -l s C-2s sumpdos -f $name -n 2 -l p C-2p sumpdos -f $name -n 4 -l s Rh-5s sumpdos -f $name -n 4 -l d Rh-4d # Let's plot PDOSes twice: into a default window terminal (-t win) and # in a PDF file (-t pdf). Hence, we save specs into a variable. # # Note that in the PDOS specs, we can specify 'ldos' (for LDOS), # individual orbitals (s, p, d), group-orbitals defined with # ::pwtk::orbitalGroup, and also orbital expressions (or # combinations), e.g. {dxz + dyz} # # 'ldos' stands for the sum of all orbitals of a given type, e.g., for p # orbitals, ldos = px + py + pz set pdos_specs { { O-2p ldos C-2p ldos Rh-5s ldos Rh-4d ldos } { O-2s s O-2p pā„ O-2p pā } { C-2s s C-2p pā C-2p pā„ } { Rh-5s s Rh-4d dā„ Rh-4d dā Rh-4d {dxz + dyz} } } # the above specs define four PDOS plots: # * plot #1: O 2p, C 2p, Rh 5s, and Rh 4d # * plot #2: O 2s, 2pā„ and 2pā # * plot #3: C 2s, 2pā„ and 2pā # * plot #4: Rh 5s, dā„, 4dā, 4dxz + 4dyz # ::pwtk::pdos_multiplot plots the PDOSes into a multi plot; # let's plot multiplot into a window and a PDF file pdos_multiplot -e pw.$name.nscf.out -t win $pdos_specs O-C-Rh-pdos pdos_multiplot -e pw.$name.nscf.out -t pdf $pdos_specs O-C-Rh-pdos