TABLE OF CONTENTS


::pwtk::pwi::CELL_PARAMETERS_fromXSF

SYNOPSIS

proc ::pwtk::pwi::CELL_PARAMETERS_fromXSF {xsfFile} {

PURPOSE

Load lattice from XSF file into CELL_PARAMETERS card.

SIDE EFFECTS

The ibrav is set to 0.

ARGUMENTS

SOURCE

    # check if ibrav = 0
    set ibrav [::pwtk::input::namelistGetVarValue SYSTEM ibrav]
    if { $ibrav != 0 } {
        ::pwtk::infoMsg "setting ibrav = 0, while loading lattice from XSF file: $xsfFile"
        SYSTEM " ibrav = 0 "
    }

    # 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
}