TABLE OF CONTENTS


::pwtk::ldos_fullplot

SYNOPSIS

proc ::pwtk::ldos_fullplot {args} {

USAGE

    ::pwtk::ldos_fullplot  ?-out ROOTNAME?  ?OPTIONS?  FILPLOT

PURPOSE

Plot the LDOS(es) of each atom into a separate plot of a multiplot.

OPTIONS

For other options, see ::pwtk::ldos_multiplot

ARGUMENT

SOURCE

    addOpts_ options usage [subst {
        {out.arg  {}          "rootname for the Gnuplot-script and image file"}
        {t.arg    $::pwtk::gp::gp(workflow.terminal)   "terminal for the plot"}
    }] {
        {-out ROOTNAME} {-t TERMINAL}
    }
    set nargmin 1
    set nargmax -1
    set usage "[fmtUsage_ $usage]  ?OPTIONS?  FILPLOT"
    parseKnownOpt_

    set filplot [lindex $args end]
    set args [lrange $args 0 end-1]

    if { $opt(out) eq {} } {
        set plotname $filplot
    } else {
        set plotname [headname $opt(out) .$opt(t)]
    }
    set plotname $plotname.fullLDOS

    print "LDOS_FULLPLOT:\nrootname for plotting files:                $plotname"

    # construct a list of lists of LDOS plots
    
    set nat 0
    foreach f [pdos_atm_files -f $filplot] {
        # extract atom.# (iat) and angular momentum (l) from the filename
        regexp {pdos_atm#(\d+)\(\w+\)_wfc#\d+\((\w)\)} $f matchVar iat l
        lappend l1($iat,$l) $f
        if { $iat > $nat} { set nat $iat }
    }
    for {set iat 1} {$iat <= $nat} {incr iat} {
        foreach l {s p d f g h} {
            if { [info exist l1($iat,$l)] } {
                foreach x $l1($iat,$l) {
                    lappend l2($iat) $x
                }
            }
        }
        ifnotempty l2($iat) { lappend ll $l2($iat) }
    }
    ldos_multiplot {*}$args -t $opt(t) $ll $plotname
}