TABLE OF CONTENTS
::pwtk::xsf::getPrimCoorUnit
SYNOPSIS
proc ::pwtk::xsf::getPrimCoorUnit {xsfFile} {
USAGE
::pwtk::xsf::getPrimCoorUnit xsfFile
PURPOSE
Return the unit in which the primitive coordinates 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 *PRIMCOOR*] if { $ind > -1 } { return [::pwtk::xsf::getUnit_ [lindex $xsfList $ind]] } else { ::pwtk::error "$xsfFile is not an XSF file" 1 } return "" }