TABLE OF CONTENTS


::pwtk::ldos_plot

SYNOPSIS

proc ::pwtk::ldos_plot {args} {

USAGE

   ::pwtk::ldos_plot  ?SPECIFIC-OPTIONS?  ?PLOTTING-OPTIONS?  PDOSFILE_LIST  ?HEAD?

   where SPECIFIC-OPTIONS are:

       -e  E_FERMI|PWO_FILE
       -o  ORIENT

   For PLOTTING-OPTIONS, see: ::pwtk::plot.
   Ignored PLOTTING-OPTIONS: -u

   A more detailed description of SPECIFIC-OPTIONS and ARGUMENTS is provided below.

DESCRIPTION

Visualize the specified LDOSes as a "single-plot" with aid of Gnuplot.

SPECIFIC OPTIONS

See ::pwtk::ldos_multiplot

PLOTTING OPTIONS

See ::pwtk::plot

ARGUMENTS

The PDOSFILE_LIST is a plain list consisting of PDOS files, i.e.:

      set PDOSFILE_LIST {
          pdosFile1 pdosFile2 pdosFile3 ...
      }

For each file in the list, the LDOS will be plotted in a "single-plot".

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"
    print "Options & arguments :  $args\n"
    
    # parse command-line options & initialize plotting
    set arguments "PDOSFILE_LIST  ?HEAD?"
    xdosParseOpts_initPlot_
    
    # make an LDOS plot for file in $pdosLL

    #
    # filledcurves
    #
    if { $dos_fill } {
        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
    
    return [::pwtk::gp::execDisplay_ $gp opt]
}