TABLE OF CONTENTS
::pwtk::pdos_run
SYNOPSIS
proc ::pwtk::pdos_run {args} {
USAGE
pdos_run ?-scf? ?-k KGRID? ?-emin EMIN? ?-t TERMINAL? head
OPTIONS
- -scf ... perform an SCF pw.x calculation prior to the NSCF pw.x calculation
- -k KGRID ... k-grid specs for the NSCF pw.x calculation; KGRID has the syntax of K_POINTS (automatic), i.e.: nk1 nk2 nk3 ?sk1? ?sk2? ?sk3?; if the sk1,sk2,sk3 shifts are not specified, 0 0 0 is used.
- -emin EMIN ... the minimum-energy (with respect to Fermi energy in eV) to be used for projwfc.x, i.e., Emin of projwfc.x is set to: Emin = EMIN + Efermi
- -t TERMINAL ... terminal to plot to (default = eps); possible terminals are those returned by ::pwtk::gp::pwtk_terminals (file-terminals: eps, pdf, svg, png; window-terminals: qt, wxt, x11).
ARGUMENTS
- head -- the rootname for files, which will be named as prefix.$head.postfix
DESCRIPTION
Run a workflow of calculations to get projwfc.x projections and plots all LDODes and PDOSes. The sequence of jobs is:
pw.x (calculation = 'nscf') --> projwfc.x --> plot (with gnuplot)
BEWARE
This workflow performs NSCF calculation, implying that an SCF (or *relax) calcution must be run prior to using this workflow. Optionally, the PROJWFC namelist chould also be predfined.
EXAMPLE
pdos_run -k {8 8 8} -emin -10 -t png $head
RETURN VALUE
Filenames of the created LDOS and PDOS plots (for file terminals) or the empty string (for window terminals).
SOURCE
printTitle PDOS_RUN "Running the PDOS workflow" print "Workflow options : $args" set narg 1 set usage "-k KGRID -emin EMIN -t TERMINAL head" set options { {scf "perform SCF calculation prior to NSCF"} {k.arg {} "k-grid specs"} {emin.arg {} "Emin for projwfc.x with respect to Fermi energy (in eV)"} {t.arg eps "terminal to plot to"} } parseOpt_ checkOType_ -k $opt(k) {numberlist nonnegint} "list of non-negative integer numbers" checkOType_ -emin $opt(emin) double number set head $args print "Rootname for files: $head\n" # k-points if { $opt(k) ne {} } { lassign $opt(k) nk1 nk2 nk3 sk1 sk2 sk3 ifset sk1 0 ifset sk2 0 ifset sk3 0 } input_pushpop { if { $opt(scf) } { # pw.x SCF print "Performing requested SCF pw.x calculation" CONTROL { calculation = 'scf' } input_clear IONS CELL runPW scf.$head } # pw.x NSCF if { [info exists nk1] } { print "Performing NSCF pw.x calculation using K_POINTS (automatic) { $nk1 $nk2 $nk3 $sk1 $sk2 $sk3 }" K_POINTS (automatic) "$nk1 $nk2 $nk3 $sk1 $sk2 $sk3" } CONTROL { calculation = 'nscf' } input_clear IONS CELL set pwo [runPW nscf.$head] set Efermi [::pwtk::pwo::efermi $pwo] print "Fermi energy ($pwo) : $Efermi eV\n" # projwfc.x PROJWFC " filpdos = '$head' " if { $opt(emin) != "" } { print "Setting the Emin value for projwfc.x to $opt(emin) eV below the Fermi energy (Emin = $opt (emin)+$Efermi eV)\n" PROJWFC " Emin = $opt(emin)+$Efermi " } runPROJWFC projwfc.$head } print "Plotting all LDOSes and PDOSes ...\n" set ldos_ [ldos_fullplot -e $pwo -o landscape -t $opt(t) $head] set pdos_ [pdos_fullplot -e $pwo -o landscape -t $opt(t) $head] if { $ldos_ ne {} } { print PDOS_RUN "All LDOSes were plotted to : $ldos_ All PDOSes were plotted to : $pdos_\n" } return [concat $ldos_ $pdos_] }