TABLE OF CONTENTS
::pwtk::pwi::load_fromPWI
SYNOPSIS
proc ::pwtk::pwi::load_fromPWI {pwi {clear_existing 1}} {
PURPOSE
Load the input data from existing pw.x input file.
If clear_existing == 1, then the current input will be cleared, but otherwise the data will be simply added to the existing data.
ARGUMENTS
- pwi -- filename of the pw.x input file from which to extract the input data
- clear_existing -- [optional] should the current input data be cleared?
SOURCE
::pwtk::fileMustExist $pwi "pw.x input" if { [::pwtk::is_true $clear_existing] } { # clear the current pw.x input data ... ::pwtk::pwi::clear } # pw.x input file must contain the CONTROL namelist if { [catch {::pwtk::readNamelists $pwi CONTROL 1}] } { ::pwtk::error "input file \"$pwi\" does not appear to be a pw.x input file" 1 } # read the namelists & cards set output [::pwtk::readNamelists $pwi $::pwtk::pwi::namelist_flow_list] append output [::pwtk::readCards $pwi $::pwtk::pwi::card_flow_list] eval $output ::pwtk::input::namelists_ityp2atmSymb_ $::pwtk::pwi::namelist_flow_list }