mirror of
https://github.com/triqs/dft_tools
synced 2024-08-28 23:12:02 +02:00
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).
This commit is contained in:
parent
99f87cc70f
commit
207c637be2
@ -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)
|
||||
|
@ -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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user