mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 04:13:47 +01:00
Added consistency check of projector characters
Since in the new implementation the projectors produced by VASP are output only for selected functions it is necessary to check that input cfg-file specifies only those projectors that were selected in the INCAR file. The consistency routine checks for every shell and site/orbital character that a corresponding projector is present in PROJCAR.
This commit is contained in:
parent
89b7a95a8b
commit
f96e4dfe9e
@ -81,10 +81,21 @@ def check_data_consistency(pars, el_struct):
|
||||
"""
|
||||
# Check that ions inside each shell are of the same sort
|
||||
for sh in pars.shells:
|
||||
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"
|
||||
|
||||
# Check that ion and orbital lists in shells match those of projectors
|
||||
ion_list = sh['ion_list']
|
||||
lshell = sh['lshell']
|
||||
for ion in ion_list:
|
||||
for par in el_struct.proj_params:
|
||||
if par['isite'] - 1 == ion and par['l'] == lshell:
|
||||
break
|
||||
else:
|
||||
errmsg = "Projector for isite = %s, l = %s does not match PROJCAR"%(ion + 1, lshell)
|
||||
raise Exception(errmsg)
|
||||
|
||||
|
||||
################################################################################
|
||||
# select_bands()
|
||||
################################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user