From f89ea4c639fc3a8bcf38b23e820b560064626c04 Mon Sep 17 00:00:00 2001 From: "Oleg E. Peil" Date: Wed, 16 Sep 2015 11:56:54 +0200 Subject: [PATCH] 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). --- python/converters/vasp/python/plotools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/converters/vasp/python/plotools.py b/python/converters/vasp/python/plotools.py index 0bd14a16..09a5cb82 100644 --- a/python/converters/vasp/python/plotools.py +++ b/python/converters/vasp/python/plotools.py @@ -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)