From 0816d45d59858d12e4e0ab55570d0aad352e32f5 Mon Sep 17 00:00:00 2001 From: Oleg Peil Date: Sun, 15 Feb 2015 16:59:51 +0100 Subject: [PATCH] * Added (empty) function 'parse_general()' * Completed 'parse_input()' --- python/converters/vasp/python/inpconf.py | 31 +++++++++--------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/python/converters/vasp/python/inpconf.py b/python/converters/vasp/python/inpconf.py index 1856e8b3..4f4cfecc 100644 --- a/python/converters/vasp/python/inpconf.py +++ b/python/converters/vasp/python/inpconf.py @@ -427,6 +427,17 @@ class ConfigParameters: assert sh_refs_used == range(self.nshells), "Some shells are not inside any of the groups" +################################################################################ +# +# parse_general() +# +################################################################################ + def parse_general(self): + """ + Parses [General] section. + """ +# TODO: + pass ################################################################################ # @@ -438,30 +449,12 @@ class ConfigParameters: """ Parses input conf-file. """ + self.parse_general() self.parse_shells() self.parse_groups() self.groups_shells_consistency() -# Return a - output_pars = [{} for isec in xrange(nsections)] - for isec, section in enumerate(sections): - print "Section: %s"%(section) - for par in required.keys(): - try: - par_str = cp.get(section, par) - except ConfigParser.NoOptionError: - raise SystemExit("*** Error: Required entry '%s' not found in the input file"%(par)) - - print " %s: %s"%(par, par_str) - key = required[par][0] - parse_fun = required[par][1] - output_pars[isec][key] = parse_fun(par_str) - - print output_pars - print cp.get(section, 'rtransform').strip().split('\n') - - return output_pars if __name__ == '__main__': narg = len(sys.argv)