TABLE OF CONTENTS
::pwtk::pwi::CELL_PARAMETERS_fromXSF
SYNOPSIS
proc ::pwtk::pwi::CELL_PARAMETERS_fromXSF {xsfFile} {
PURPOSE
Load cell vectors from XSF file into CELL_PARAMETERS card.
SIDE EFFECTS
The ibrav is set to 0.
ARGUMENTS
- xsfFile -- name of XSF file
- symmetry -- the symmetry flag for CELL_PARAMETERS, either cubic or hexagonal (optional, default = cubic)
SOURCE
::pwtk::fileMustExist $xsfFile XSF # check if ibrav = 0 set ibrav [::pwtk::input::namelistGetVarValue SYSTEM ibrav] if { $ibrav != 0 } { ::pwtk::infoMsg "setting ibrav = 0, while loading cell vectors from XSF file: $xsfFile" # also unset the celldm() & A SYSTEM " ibrav = 0 , celldm(1) = , A = , a = " } # beware that the unit for PRIMVEC vectors in XSF file can be only # angstrom, while XSF2 also supports bohr. This is directly # portable to CELL_PARAMETERS set unit [::pwtk::xsf::getPrimVecUnit $xsfFile] set vec [::pwtk::purifyVec [::pwtk::xsf::getPrimVec $xsfFile]] CELL_PARAMETERS $unit $vec }