mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 04:13:47 +01:00
Fix SO/SP in reading pmat and oubwin files
This commit is contained in:
parent
5bb1d34459
commit
7946e548a2
@ -519,11 +519,11 @@ class Wien2kConverter(ConverterTools):
|
||||
# band_window: Contains the index of the lowest and highest band within the
|
||||
# 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]
|
||||
elif (SP == 1 and SO == 0): # SP but no SO
|
||||
elif (SP == 1): # SP = 1
|
||||
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."
|
||||
|
||||
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
|
||||
# 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]
|
||||
elif (SP == 1 and SO == 0): # SP but no SO
|
||||
elif (SP == 1): # SP = 1
|
||||
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."
|
||||
|
||||
velocities_k = [[] for f in files]
|
||||
|
Loading…
Reference in New Issue
Block a user