TABLE OF CONTENTS
::pwtk::ldos_plot
SYNOPSIS
proc ::pwtk::ldos_plot {args} {
USAGE
ldos_plot ?-e E_FERMI|PWO_FILE? ?-xr XMIN:XMAX? ?-yr YMIN:YMAX? ?-yf YFORMAT? ?-lm LEFT_MARGIN? \ ?-t TERM? ?-s PX,PY? ?-v? pdosFileL head
DESCRIPTION
Visualize the specified LDOSes as a "single-plot" with aid of Gnuplot.
ARGUMENTS
- pdosFileL -- list of projwfc.x PDOS files (or their sum generated with sumpdos.x)
- head -- head for the output generated $head.gp and $head.eps files
The pdosFileL is a plain list consisting of PDOS files, i.e.:
set pdosFileL { pdosFile1 pdosFile2 pdosFile3 ... }
For each file in the list, the LDOS will be plotted in a "single-plot".
OPTIONS
- -e VALUE ... Fermi energy (either a floating-point number or a pw.x output file from where to grep the Fermi energy)
- -xr RANGE ... xrange for plots specified as XMIN:XMAX (where XMIN and XMAX are numbers)
- -yr RANGE ... yrange for plots specified as YMIN:YMAX
- -yf FORMAT ... format for the Y-axis numbers (in C syntax)
- -lm MARGIN ... left-margin for PDOS plots (more digits on Y-axis require wider left-margin)
- -t TERM ... terminal to plot to (default = eps), possible terminals are those returned by ::pwtk::gp::pwtk_terminals (e.g., file-terminals: eps, pdf, svg, png; window-terminals: qt, wxt, x11).
- -s PX,PY ... terminal size in pixels (default = 1200,800); ignored for EPS
- -v ... visualize the generated EPS file (for -t eps)
Note that options are optional and any number of them can be specified.
RETURN VALUE
Filename of the created image (for file terminals) or the empty string (for window terminals).
SOURCE
set xdos LDOS set mode single printTitle "$xdos plotting" xdosParseOptions_ xdosGnuplotOptions_ # make an LDOS plot for file in $pdosLL # # filledcurves # set lt 1 foreach pdos $pdosLL { set kres [pdos_kresolved $pdos] set spin [pdos_spin $pdos] set Ei [expr 1 + $kres] set Yi [expr 2 + $kres] append plot " '$pdos' u (\$$Ei-Efermi):(\$$Ei-Efermi <= 0.0 ? \$$Yi : 0/0) not w filledcurve y1=0.0 lt $lt, \\\n" if { $spin } { set Yi [expr 3 + $kres] append plot " '$pdos' u (\$$Ei-Efermi):(\$$Ei-Efermi <= 0.0 ? -\$$Yi : 0/0) not w filledcurve y1=0.0 lt $lt, \\\n" } incr lt } append plot " \\\n" # # lines # set lt 1 foreach pdos $pdosLL { set kres [pdos_kresolved $pdos] set spin [pdos_spin $pdos] set Ei [expr 1 + $kres] set Yi [expr 2 + $kres] if { $lt > 1 } { append plot ", \\\n" } append plot " '$pdos' u (\$$Ei-Efermi):(\$$Yi) t '$pdos' w l lt $lt lw 2" if { $spin } { set Yi [expr 3 + $kres] append plot ", \\ '$pdos' u (\$$Ei-Efermi):(-\$$Yi) not w l lt $lt lw 2" } incr lt } $gp plot $plot xdosExecGnuplot_ return $outputs }