TABLE OF CONTENTS
::pwtk::readNamelists
SYNOPSIS
proc ::pwtk::readNamelists {inputFile namelistList {must_exist 0}} {
PURPOSE
Read namelists from the QE input file and return them in the PWTK syntax.
This routine is used internally by PWTK in load_from*** set of commands.
ARGUMENTS
- inputFile -- QE input file to read
- namelistList -- list of namelists to read
- must_exist -- (optional) must the namelists exist (default = no)
SOURCE
set fid [open $inputFile r] set output {} foreach nml $namelistList { seek $fid 0 start set nmlContent [::fnml::getContent $nml $fid $must_exist 0] if { $nmlContent != {} } { append output "[string toupper $nml] { $nmlContent }\n" } } close $fid return $output }