3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 22:53:50 +01:00

Fix SO/SP in reading pmat and oubwin files

This commit is contained in:
Manuel 2019-06-14 11:18:58 -04:00
parent 5bb1d34459
commit 7946e548a2

View File

@ -519,11 +519,11 @@ class Wien2kConverter(ConverterTools):
# band_window: Contains the index of the lowest and highest band within the # band_window: Contains the index of the lowest and highest band within the
# projected subspace (used by dmftproj) for each k-point. # projected subspace (used by dmftproj) for each k-point.
if (SP == SO): # if SP and SO are both 1 or both 0 if (SP == 0 and SO == 0): # if SP and SO are both 0
files = [self.bandwin_file] files = [self.bandwin_file]
elif (SP == 1 and SO == 0): # SP but no SO elif (SP == 1): # SP = 1
files = [self.bandwin_file + 'up', self.bandwin_file + 'dn'] files = [self.bandwin_file + 'up', self.bandwin_file + 'dn']
else: # SP=0 and SO=1 else:
assert 0, "convert_misc_input: Reading oubwin error! Check SP and SO, if SO=1 SP must be 1." assert 0, "convert_misc_input: Reading oubwin error! Check SP and SO, if SO=1 SP must be 1."
band_window = [None for isp in range(SP + 1 - SO)] band_window = [None for isp in range(SP + 1 - SO)]
@ -640,11 +640,11 @@ class Wien2kConverter(ConverterTools):
# velocities_k: velocity (momentum) matrix elements between all bands in band_window_optics # velocities_k: velocity (momentum) matrix elements between all bands in band_window_optics
# and each k-point. # and each k-point.
if (SP == SO): # if SP and SO are both 1 or both 0 if (SP == 0 and SO == 0): # if SP and SO are both 0
files = [self.pmat_file] files = [self.pmat_file]
elif (SP == 1 and SO == 0): # SP but no SO elif (SP == 1): # SP = 1
files = [self.pmat_file + 'up', self.pmat_file + 'dn'] files = [self.pmat_file + 'up', self.pmat_file + 'dn']
else: # SP=0 and SO=1 else:
assert 0, "convert_transport_input: Reading velocity file error! Check SP and SO, if SO=1 SP must be 1." assert 0, "convert_transport_input: Reading velocity file error! Check SP and SO, if SO=1 SP must be 1."
velocities_k = [[] for f in files] velocities_k = [[] for f in files]