3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-18 12:03:50 +01:00

fixed bug with n_orbitals for H(k)

This commit is contained in:
Malte Schüler 2019-07-03 11:16:30 +02:00
parent 1fc15390d6
commit 2069d251a0
2 changed files with 4 additions and 1 deletions

View File

@ -197,6 +197,7 @@ class VaspConverter(ConverterTools):
n_corr_shells = len(corr_shells) n_corr_shells = len(corr_shells)
n_orbs = sum([sh['dim'] for sh in shells]) n_orbs = sum([sh['dim'] for sh in shells])
# FIXME: atomic sorts in Wien2K are not the same as in VASP. # FIXME: atomic sorts in Wien2K are not the same as in VASP.
# A symmetry analysis from OUTCAR or symmetry file should be used # A symmetry analysis from OUTCAR or symmetry file should be used
# to define equivalence classes of sites. # to define equivalence classes of sites.
@ -260,7 +261,7 @@ class VaspConverter(ConverterTools):
rf_hk = self.read_data(f_hk) rf_hk = self.read_data(f_hk)
for isp in xrange(n_spin_blocs): for isp in xrange(n_spin_blocs):
for ik in xrange(n_k): for ik in xrange(n_k):
n_orbitals[ik, isp] = n_orbs
for ib in xrange(n_orbs): for ib in xrange(n_orbs):
for jb in xrange(n_orbs): for jb in xrange(n_orbs):
hopping[ik, isp, ib, jb] = rf_hk.next() hopping[ik, isp, ib, jb] = rf_hk.next()

View File

@ -562,7 +562,9 @@ class SumkDFT(object):
idmat = [numpy.identity( idmat = [numpy.identity(
self.n_orbitals[ik, ntoi[sp]], numpy.complex_) for sp in spn] self.n_orbitals[ik, ntoi[sp]], numpy.complex_) for sp in spn]
M = copy.deepcopy(idmat) M = copy.deepcopy(idmat)
for ibl in range(self.n_spin_blocks[self.SO]): for ibl in range(self.n_spin_blocks[self.SO]):
ind = ntoi[spn[ibl]] ind = ntoi[spn[ibl]]
n_orb = self.n_orbitals[ik, ind] n_orb = self.n_orbitals[ik, ind]
M[ibl] = self.hopping[ik, ind, 0:n_orb, 0:n_orb] - \ M[ibl] = self.hopping[ik, ind, 0:n_orb, 0:n_orb] - \