mirror of
https://github.com/triqs/dft_tools
synced 2025-01-03 10:05:49 +01:00
[VaspConverter] fix mapping from shell/ions to corr-shells
This commit is contained in:
parent
67188b4a43
commit
6438a0dbc6
@ -236,11 +236,12 @@ class VaspConverter(ConverterTools):
|
|||||||
# TODO: check what 'irep' entry does (it seems to be very specific to dmftproj)
|
# TODO: check what 'irep' entry does (it seems to be very specific to dmftproj)
|
||||||
pars['irep'] = 0
|
pars['irep'] = 0
|
||||||
shells.append(pars)
|
shells.append(pars)
|
||||||
shion_to_shell[ish].append(i)
|
|
||||||
shorbs_to_globalorbs[ish].append([last_dimension,
|
shorbs_to_globalorbs[ish].append([last_dimension,
|
||||||
last_dimension + sh['ndim']])
|
last_dimension + sh['ndim']])
|
||||||
last_dimension = last_dimension + sh['ndim']
|
last_dimension = last_dimension + sh['ndim']
|
||||||
if sh['corr']:
|
if sh['corr']:
|
||||||
|
shion_to_shell[ish].append(icsh)
|
||||||
|
icsh += 1
|
||||||
corr_shells.append(pars)
|
corr_shells.append(pars)
|
||||||
|
|
||||||
|
|
||||||
@ -254,8 +255,7 @@ class VaspConverter(ConverterTools):
|
|||||||
# to define equivalence classes of sites.
|
# to define equivalence classes of sites.
|
||||||
n_inequiv_shells, corr_to_inequiv, inequiv_to_corr = ConverterTools.det_shell_equivalence(self, corr_shells)
|
n_inequiv_shells, corr_to_inequiv, inequiv_to_corr = ConverterTools.det_shell_equivalence(self, corr_shells)
|
||||||
|
|
||||||
if mpi.is_master_node():
|
mpi.report(f" No. of inequivalent shells: {n_inequiv_shells}")
|
||||||
print(" No. of inequivalent shells:", n_inequiv_shells)
|
|
||||||
|
|
||||||
# NB!: these rotation matrices are specific to Wien2K! Set to identity in VASP
|
# NB!: these rotation matrices are specific to Wien2K! Set to identity in VASP
|
||||||
use_rotations = 1
|
use_rotations = 1
|
||||||
@ -278,10 +278,6 @@ class VaspConverter(ConverterTools):
|
|||||||
# TODO: at the moment put T-matrices to identities
|
# TODO: at the moment put T-matrices to identities
|
||||||
T.append(numpy.identity(lmax, complex))
|
T.append(numpy.identity(lmax, complex))
|
||||||
|
|
||||||
# if nc_flag:
|
|
||||||
## TODO: implement the noncollinear part
|
|
||||||
# raise NotImplementedError("Noncollinear calculations are not implemented")
|
|
||||||
# else:
|
|
||||||
hopping = numpy.zeros([n_k, n_spin_blocs, nb_max, nb_max], complex)
|
hopping = numpy.zeros([n_k, n_spin_blocs, nb_max, nb_max], complex)
|
||||||
f_weights = numpy.zeros([n_k, n_spin_blocs, nb_max], complex)
|
f_weights = numpy.zeros([n_k, n_spin_blocs, nb_max], complex)
|
||||||
band_window = [numpy.zeros((n_k, 2), dtype=int) for isp in range(n_spin_blocs)]
|
band_window = [numpy.zeros((n_k, 2), dtype=int) for isp in range(n_spin_blocs)]
|
||||||
@ -322,8 +318,6 @@ class VaspConverter(ConverterTools):
|
|||||||
rf_hk.close()
|
rf_hk.close()
|
||||||
|
|
||||||
# Projectors
|
# Projectors
|
||||||
# print n_orbitals
|
|
||||||
# print [crsh['dim'] for crsh in corr_shells]
|
|
||||||
proj_mat_csc = numpy.zeros([n_k, n_spin_blocs, sum([sh['dim'] for sh in shells]), numpy.max(n_orbitals)], complex)
|
proj_mat_csc = numpy.zeros([n_k, n_spin_blocs, sum([sh['dim'] for sh in shells]), numpy.max(n_orbitals)], complex)
|
||||||
|
|
||||||
# TODO: implement reading from more than one projector group
|
# TODO: implement reading from more than one projector group
|
||||||
@ -376,7 +370,6 @@ class VaspConverter(ConverterTools):
|
|||||||
#corr_shell.pop('ion_list')
|
#corr_shell.pop('ion_list')
|
||||||
things_to_set = ['n_shells','shells','n_corr_shells','corr_shells','n_spin_blocs','n_orbitals','n_k','SO','SP','energy_unit']
|
things_to_set = ['n_shells','shells','n_corr_shells','corr_shells','n_spin_blocs','n_orbitals','n_k','SO','SP','energy_unit']
|
||||||
for it in things_to_set:
|
for it in things_to_set:
|
||||||
# print "%s:"%(it), locals()[it]
|
|
||||||
setattr(self,it,locals()[it])
|
setattr(self,it,locals()[it])
|
||||||
|
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
@ -384,7 +377,6 @@ class VaspConverter(ConverterTools):
|
|||||||
|
|
||||||
fh.close()
|
fh.close()
|
||||||
|
|
||||||
|
|
||||||
proj_or_hk = self.proj_or_hk
|
proj_or_hk = self.proj_or_hk
|
||||||
|
|
||||||
#new variable: dft_code - this determines which DFT code the inputs come from.
|
#new variable: dft_code - this determines which DFT code the inputs come from.
|
||||||
|
Loading…
Reference in New Issue
Block a user