TABLE OF CONTENTS
::pwtk::pwo::toteneLine
SYNOPSIS
proc ::pwtk::pwo::toteneLine {file {index end}} {
PURPOSE
Extract an index-th total-energy line from PW-output. 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-line (optional), default = end
SOURCE
pwtk::lineread line $file { if { [regexp {^!} $line] } { lappend eneLineList $line } } if { ! [info exists eneLineList] } { ::pwtk::error "no ^! (i.e. total energy) line found in output file: $file" set eneLineList {} } return [lindex $eneLineList $index] }