3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-02 11:25:29 +02:00

Added output of ion sort corresponding to a shell

The data for a projected shell (output to a '*.pgX' file) contains
now the ion sort corresponding to this shell.

Also, 'check_data_consistency()' was fixed by correcting the
reference to list 'type_of_ion' (which is now copied to ElectronicStructure).
This commit is contained in:
Oleg E. Peil 2015-09-16 11:56:54 +02:00 committed by Michel Ferrero
parent f2e4c2f866
commit f89ea4c639

View File

@ -78,7 +78,8 @@ def check_data_consistency(pars, el_struct):
"""
# Check that ions inside each shell are of the same sort
for sh in pars.shells:
sorts = set(el_struct.poscar.type_of_ion[sh['ion_list']])
print sh['ion_list']
sorts = set([el_struct.type_of_ion[io] for io in sh['ion_list']])
assert len(sorts) == 1, "Each projected shell must contain only ions of the same sort"
################################################################################
@ -531,6 +532,8 @@ def plo_output(conf_pars, el_struct, pshells, pgroups):
# to conventional VASP representation (starting from 1)
ion_output = [io + 1 for io in shell.ion_list]
sh_dict['ion_list'] = ion_output
sh_dict['ion_sort'] = el_struct.type_of_ion[shell.ion_list[0]]
# TODO: add the output of transformation matrices
head_shells.append(sh_dict)