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