TABLE OF CONTENTS
::pwtk::pwo::elumo
SYNOPSIS
proc ::pwtk::pwo::elumo {file {index end}} {
PURPOSE
Extract index-th lowest unoccupied level from the pw.x output file. Index can be "end" or digital number (first energy has an index of 0).
ARGUMENTS
- file -- name of the pw.x output file
- index -- which energy (optional), default = end
RETURN VALUE
- if found, value of the lowest unoccupied level
- otherwise, empty string
SOURCE
set elList {} pwtk::lineread line $file { if { [regexp {highest occupied, lowest unoccupied level} $line] } { lappend elList [lindex $line end] } } return [lindex $elList $index] }