TABLE OF CONTENTS


::pwtk::mopdos_spin

SYNOPSIS

proc ::pwtk::mopdos_spin {mopdosFile} {

DESCRIPTION

Query if $mopdosFile corresponds to spin-polarized case.

RETURN VALUE

1 -- if spin-polarized 0 -- otherwise

SOURCE

    fileMustExist $mopdosFile MOPDOS
    
    set fid [open $mopdosFile r]
    gets $fid line
    close $fid

    # format of spin-pol molecularpdos.x filout header:
    #
    #   0 1          2  3    4
    #   # ibnd_part  E (eV)  tot_up(E)  tot_dw(E)
    #     ...        ...     ...        ...
    
    if { [lindex $line 4] == "tot_up(E)" } {
        return 1
    }
    return 0
}