TABLE OF CONTENTS
::pwtk::pwo::getNAtoms
SYNOPSIS
proc ::pwtk::pwo::getNAtoms {pwoFile} {
PURPOSE
Return the number of atoms (i.e. nat) from the pw.x output file.
ARGUMENTS
pwoFile -- name of pw.x output file
SOURCE
set fid [open $pwoFile r] while { ! [eof $fid] } { # gets $fid line # if { [string match {*number of atoms/cell*} $line] } { close $fid return [lindex $line end] } } close $fid ::pwtk::error "$pwoFile is not a pw.x output file: number of atoms/cell record not found" return 0 }