TABLE OF CONTENTS


::pwtk::sumldos

SYNOPSIS

proc ::pwtk::sumldos {args} {

USAGE

   sumldos ?-f PATTERN?  ?-n PATTERN?  ?-s PATTERN?  ?-w PATTERN?  ?-l PATTERN?  FILEOUT

DESCRIPTION

Sum LDOSes for projwfc.x filpdos pdos_atm files that matches the supplied glob patterns. LDOSes are summed using the QE sumpdos.x program.

OPTIONS

For description of options, see ::pwtk::pdos_atm_files

ARGUMENTS

RETURN VALUE

The value of the "fileout" argument.

SOURCE

    # the number of arguments must be odd when implcit options (-?,
    # -help, --) are stripped from $args
    
    if { ! ([llength [trimImplicitOpts_ $args]] % 2) } {
        ::pwtk::error "wrong number of arguments, must be:\n 
[procName] ?-f PATTERN?  ?-n PATTERN?  ?-s PATTERN?  ?-w PATTERN?  ?-l PATTERN?  fileout" 1
    }
    
    ::pwtk::print LDOS "Summing LDOSes..."

    set pdosFiles [::pwtk::pdos_atm_files {*}$args]
    set fileout   [lindex $args end]
    return [::pwtk::sumldosFiles $pdosFiles $fileout]
}