TABLE OF CONTENTS


::pwtk::pwi::get

SYNOPSIS

proc ::pwtk::pwi::get {} {

PURPOSE

Return the content of the pw.x input.

SOURCE

    variable input_flow_list
    variable all_atomic_species

    set all_atomic_species [::pwtk::input::cardGetContent ATOMIC_SPECIES]
    
    ::pwtk::input::pushpop {

        ## check the ntyp vs ATOMIC_SPECIES compatibility    
        #if { [getNTyp] != [::pwtk::input::namelistGetVarValue SYSTEM ntyp] } {
        #    pwtk::infoMsg "ntyp and number of atomic species specified in ATOMIC_SPECIES card\nare not equal; filtering out unused atomic species"
        #}
    
        # EXCEPTION: starting from QE v4.0, the pw.x aborts if unused
        # atomic species are specified, which is what we don't want:
        # filter-out unused species
        
        ATOMIC_SPECIES [filterAtomicSpecies]
        SYSTEM " ntyp = [getNTyp] "
        
        # convenient feature: make a dummy call to ELECTRONS as this
        # namelist must be always present, even if it is empty
        
        ELECTRONS {}
        
        ::pwtk::input::clear_
        
        foreach name $input_flow_list { 
            loadDefaults_ $name
            ::pwtk::input::appendInput_ $name
        }
    
        set result [::pwtk::input::get_]
    }
    # at this point, unfiltered ATOMIC_SPECIES are restored

    unset all_atomic_species
    
    return $result
}