mirror of
https://github.com/triqs/dft_tools
synced 2024-10-14 12:01:36 +02:00
Bugfixes in block_structure
This commit is contained in:
parent
ba79a7f708
commit
187499b00f
@ -451,10 +451,11 @@ class BlockStructure(object):
|
|||||||
warn(
|
warn(
|
||||||
'Removing shells from degenerate shell {}. Cannot guarantee that they continue to be equivalent.')
|
'Removing shells from degenerate shell {}. Cannot guarantee that they continue to be equivalent.')
|
||||||
else: # degshell is list
|
else: # degshell is list
|
||||||
for key in degsh:
|
degsh1 = copy.deepcopy(degsh) # in order to not remove a key while iterating
|
||||||
|
for key in degsh1:
|
||||||
if not key in gf_struct:
|
if not key in gf_struct:
|
||||||
|
warn('Removing shells from degenerate shell {}.')
|
||||||
degsh.remove(key)
|
degsh.remove(key)
|
||||||
continue
|
|
||||||
# reindexing gf_struct so that it starts with 0
|
# reindexing gf_struct so that it starts with 0
|
||||||
for k in gf_struct:
|
for k in gf_struct:
|
||||||
gf_struct[k] = range(len(gf_struct[k]))
|
gf_struct[k] = range(len(gf_struct[k]))
|
||||||
@ -510,7 +511,7 @@ class BlockStructure(object):
|
|||||||
for icrsh in range(len(new_gf_struct)):
|
for icrsh in range(len(new_gf_struct)):
|
||||||
for block, indices in self.gf_struct_sumk[icrsh]:
|
for block, indices in self.gf_struct_sumk[icrsh]:
|
||||||
if not block in new_gf_struct[icrsh]:
|
if not block in new_gf_struct[icrsh]:
|
||||||
del new_gf_struct_transformed[block]
|
#del new_gf_struct_transformed[block] # this MUST be wrong, as new_gf_struct_transformed needs to have a integer index for icrsh... # error when index is not kept at all
|
||||||
continue
|
continue
|
||||||
T = eff_trans_sumk[icrsh][block]
|
T = eff_trans_sumk[icrsh][block]
|
||||||
for index in indices:
|
for index in indices:
|
||||||
|
Loading…
Reference in New Issue
Block a user