TABLE OF CONTENTS
::pwtk::xsf::getPrimVecUnit
SYNOPSIS
proc ::pwtk::xsf::getPrimVecUnit {xsfFile} {
USAGE
::pwtk::xsf::getPrimVecUnit xsfFile
PURPOSE
Return the unit in which the primitive vectors are specified in the XSF file. Beware that XSF supports only "angstroms" units, but XSF2 (i.e. XSF version-2) supports also other units.
SOURCE
::pwtk::fileMustExist $xsfFile XSF set xsfList [split [::pwtk::skipEmptyLines [::pwtk::readFile $xsfFile]] \n] set ind [lsearch $xsfList *PRIMVEC*] if { $ind > -1 } { return [::pwtk::xsf::getUnit_ [lindex $xsfList $ind]] } else { ::pwtk::error "$xsfFile is not an XSF file" 1 } return "" }