From 207c637be2172afd0e5cbcf68c6782fa36fa6f0d Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Thu, 13 Aug 2015 11:50:49 +0200 Subject: [PATCH] Restructured text-output routines 'main()' now calls a function 'output_as_text()' responsible for storing both a ctrl- and plo-files ('ctrl_output()' and 'plo_output()', respectively). --- python/converters/vasp/python/main.py | 2 +- python/converters/vasp/python/plotools.py | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/python/converters/vasp/python/main.py b/python/converters/vasp/python/main.py index 1f075442..ae80e44d 100644 --- a/python/converters/vasp/python/main.py +++ b/python/converters/vasp/python/main.py @@ -24,4 +24,4 @@ if __name__ == '__main__': vasp_data = vaspio.VaspData(vasp_dir) el_struct = ElectronicStructure(vasp_data) pshells, pgroups = generate_ortho_plos(pars, el_struct) - plo_output(pars, el_struct, pshells, pgroups) + output_to_ascii(pars, el_struct, pshells, pgroups) diff --git a/python/converters/vasp/python/plotools.py b/python/converters/vasp/python/plotools.py index 78b40776..d25697c5 100644 --- a/python/converters/vasp/python/plotools.py +++ b/python/converters/vasp/python/plotools.py @@ -378,6 +378,7 @@ def ctrl_output(conf_pars, el_struct, ng): ctrl_fname = conf_pars.general['basename'] + '.ctrl' head_dict = {} +# TODO: Add output of tetrahedra # Construct the header dictionary head_dict['ngroups'] = ng head_dict['nk'] = el_struct.kmesh['nktot'] @@ -407,7 +408,6 @@ def ctrl_output(conf_pars, el_struct, ng): # plo_output # ################################################################################ -# TODO: k-points with weights should be stored once and for all def plo_output(conf_pars, el_struct, pshells, pgroups): """ Outputs PLO groups into text files. @@ -444,5 +444,17 @@ def plo_output(conf_pars, el_struct, pshells, pgroups): ... """ - ctrl_output(conf_pars, el_struct, len(pgroups)) + pass +################################################################################ +# +# output_as_text +# +################################################################################ +def output_as_text(pars, el_struct, pshells, pgroups): + """ + Output all information necessary for the converter as text files. + """ + ctrl_output(conf_pars, el_struct, len(pgroups)) + plo_output(conf_pars, el_struct, pshells, pgroups): +