TABLE OF CONTENTS


::pwtk::pwi::alat

SYNOPSIS

proc ::pwtk::pwi::alat {} {

PURPOSE

Get the value of alat in Bohr (i.e. celldm(1) or A, depending on which is specified). If neither is specified 0.0 is returned.

RETURN VALUE

Either the value of celldm(1) or the value of A converted to Bohr-units or 0.0 if neither of celldm(1) and A is defined.

SOURCE

    set A    [::pwtk::pwi::aA] 
    set alat [::pwtk::input::namelistGetVarValue SYSTEM celldm(1)]

    if { $A != "" && $alat != "" } {
        pwtk::error "both A and celldm(1) are specified, but only one of them must be specified !!!" 1
    }

    if { $A != "" } {
        set alat [expr $::pwtk::angs2bohr * $A]
    }    
    if { $alat == "" } {
        set alat 0.0
    }

    return $alat
}