TABLE OF CONTENTS
::pwtk::xsf::getNAtoms
SYNOPSIS
proc ::pwtk::xsf::getNAtoms {xsfFile} {
PURPOSE
Return the number of atoms in the XSF file.
ARGUMENTS
xsfFile -- name of XSF file
SOURCE
::pwtk::fileMustExist $xsfFile XSF set xsfList [split [::pwtk::skipEmptyLines [::pwtk::readFile $xsfFile]] \n] set ind [lsearch $xsfList *PRIMCOOR*] if { $ind > -1 } { return [lindex [lindex $xsfList [expr {$ind + 1}]] 0] } else { ::pwtk::error "$xsfFile is not an XSF file" 1 } }