3
0
mirror of https://github.com/triqs/dft_tools synced 2024-09-16 17:35:31 +02:00

added printout of complex part of local Hamiltonian in the Vasp converter

This commit is contained in:
Alexander Hampel 2020-04-17 02:20:23 -07:00
parent bb7419f586
commit d9e5a4d3aa
2 changed files with 4 additions and 4 deletions

View File

@ -189,9 +189,9 @@ def generate_plo(conf_pars, el_struct):
print " Shell %i"%(ish + 1) print " Shell %i"%(ish + 1)
loc_ham = pshells[pgroup.ishells[ish]].local_hamiltonian(el_struct) loc_ham = pshells[pgroup.ishells[ish]].local_hamiltonian(el_struct)
for io in xrange(loc_ham.shape[1]): for io in xrange(loc_ham.shape[1]):
print " Site %i"%(io + 1) print " Site %i (real | complex part)"%(io + 1)
for row in loc_ham[:, io, :, :].sum(0): for row in loc_ham[:, io, :, :].sum(0):
print ''.join(map("{0:14.7f}".format, row)) print ''.join(map("{0:14.7f}".format, row.real))+' |'+''.join(map("{0:14.7f}".format, row.imag))
# END DEBUG output # END DEBUG output
if 'dosmesh' in conf_pars.general: if 'dosmesh' in conf_pars.general:
print print

View File

@ -368,7 +368,7 @@ class ProjectorShell:
assert site_diag, "site_diag = False is not implemented" assert site_diag, "site_diag = False is not implemented"
assert spin_diag, "spin_diag = False is not implemented" assert spin_diag, "spin_diag = False is not implemented"
loc_ham = np.zeros((ns, nion, nlm, nlm), dtype=np.float64) loc_ham = np.zeros((ns, nion, nlm, nlm), dtype=np.complex128)
# self.proj_win = np.zeros((nion, ns, nk, nlm, nb_max), dtype=np.complex128) # self.proj_win = np.zeros((nion, ns, nk, nlm, nb_max), dtype=np.complex128)
kweights = el_struct.kmesh['kweights'] kweights = el_struct.kmesh['kweights']
@ -381,7 +381,7 @@ class ProjectorShell:
for io in xrange(nion): for io in xrange(nion):
proj_k = self.proj_win[io, isp, ik, ...] proj_k = self.proj_win[io, isp, ik, ...]
loc_ham[isp, io, :, :] += np.dot(proj_k * (eigk - el_struct.efermi), loc_ham[isp, io, :, :] += np.dot(proj_k * (eigk - el_struct.efermi),
proj_k.conj().T).real * weight proj_k.conj().T) * weight
# if not symops is None: # if not symops is None:
# occ_mats = symmetrize_matrix_set(occ_mats, symops, ions, perm_map) # occ_mats = symmetrize_matrix_set(occ_mats, symops, ions, perm_map)