TABLE OF CONTENTS
::pwtk::pwo::totforLine
SYNOPSIS
proc ::pwtk::pwo::totforLine {file {index end}} {
PURPOSE
Extract the index-th total-force file from PW-output. Index can be "end" or digital number (first total force has an index of 0).
ARGUMENTS
- file -- name of the pw.x output file
- index -- which total force-line (optional), default = end
SOURCE
pwtk::lineread line $file { if { [string match {*Total force*} $line] } { lappend forLineList $line } } if { ! [info exists forLineList] } { ::pwtk::error "no *Total force* line found in output file: $file" set forLineList {} } return [lindex $forLineList $index] }