3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-30 16:15:47 +01:00

Fixed a problem with missing nc_flag property

The ProjectorShell class must inheret 'nc_flag' from somewhere.
This is now done by passing it to the class constructor in
'generate_plo()'.
This commit is contained in:
Oleg E. Peil 2015-11-11 20:30:49 +01:00
parent 453c8531c9
commit a61e0b2526

View File

@ -305,10 +305,11 @@ class ProjectorShell:
- proj_raw (numpy.array) : array of raw projectors
"""
def __init__(self, sh_pars, proj_raw, proj_params):
def __init__(self, sh_pars, proj_raw, proj_params, nc_flag):
self.lorb = sh_pars['lshell']
self.ion_list = sh_pars['ion_list']
self.user_index = sh_pars['user_index']
self.nc_flag = nc_flag
# try:
# self.tmatrix = sh_pars['tmatrix']
# except KeyError:
@ -613,7 +614,7 @@ def generate_plo(conf_pars, el_struct):
print " Generating %i shell%s..."%(nshell, '' if nshell == 1 else 's')
pshells = []
for sh_par in conf_pars.shells:
pshell = ProjectorShell(sh_par, proj_raw, el_struct.proj_params)
pshell = ProjectorShell(sh_par, proj_raw, el_struct.proj_params, el_struct.nc_flag)
print
print " Shell : %s"%(pshell.user_index)
print " Orbital l : %i"%(pshell.lorb)