mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 04:13:47 +01:00
add deg_shells to block_structure
This commit is contained in:
parent
7599336e55
commit
ad2ee87bc7
@ -40,12 +40,14 @@ class BlockStructure(object):
|
|||||||
gf_struct_solver=None,
|
gf_struct_solver=None,
|
||||||
solver_to_sumk=None,
|
solver_to_sumk=None,
|
||||||
sumk_to_solver=None,
|
sumk_to_solver=None,
|
||||||
solver_to_sumk_block=None):
|
solver_to_sumk_block=None,
|
||||||
|
deg_shells=None):
|
||||||
self.gf_struct_sumk = gf_struct_sumk
|
self.gf_struct_sumk = gf_struct_sumk
|
||||||
self.gf_struct_solver = gf_struct_solver
|
self.gf_struct_solver = gf_struct_solver
|
||||||
self.solver_to_sumk = solver_to_sumk
|
self.solver_to_sumk = solver_to_sumk
|
||||||
self.sumk_to_solver = sumk_to_solver
|
self.sumk_to_solver = sumk_to_solver
|
||||||
self.solver_to_sumk_block = solver_to_sumk_block
|
self.solver_to_sumk_block = solver_to_sumk_block
|
||||||
|
self.deg_shells = deg_shells
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def full_structure(cls,gf_struct,corr_to_inequiv):
|
def full_structure(cls,gf_struct,corr_to_inequiv):
|
||||||
@ -99,7 +101,8 @@ class BlockStructure(object):
|
|||||||
gf_struct_sumk = gs_sumk_all,
|
gf_struct_sumk = gs_sumk_all,
|
||||||
solver_to_sumk = copy.deepcopy(solver_to_sumk),
|
solver_to_sumk = copy.deepcopy(solver_to_sumk),
|
||||||
sumk_to_solver = solver_to_sumk,
|
sumk_to_solver = solver_to_sumk,
|
||||||
solver_to_sumk_block = s2sblock)
|
solver_to_sumk_block = s2sblock,
|
||||||
|
deg_shells = [[] for ish in range(len(gf_struct))])
|
||||||
|
|
||||||
def pick_gf_struct_solver(self,new_gf_struct):
|
def pick_gf_struct_solver(self,new_gf_struct):
|
||||||
""" Pick selected orbitals within blocks.
|
""" Pick selected orbitals within blocks.
|
||||||
@ -292,7 +295,7 @@ class BlockStructure(object):
|
|||||||
G : BlockGf
|
G : BlockGf
|
||||||
the Gf that should be converted
|
the Gf that should be converted
|
||||||
G_struct : GfStructure
|
G_struct : GfStructure
|
||||||
the structure ofthat G
|
the structure of that G
|
||||||
ish : int
|
ish : int
|
||||||
shell index
|
shell index
|
||||||
show_warnings : bool
|
show_warnings : bool
|
||||||
@ -389,7 +392,7 @@ class BlockStructure(object):
|
|||||||
|
|
||||||
ret = {}
|
ret = {}
|
||||||
for element in [ "gf_struct_sumk", "gf_struct_solver",
|
for element in [ "gf_struct_sumk", "gf_struct_solver",
|
||||||
"solver_to_sumk_block"]:
|
"solver_to_sumk_block","deg_shells"]:
|
||||||
ret[element] = getattr(self,element)
|
ret[element] = getattr(self,element)
|
||||||
|
|
||||||
def construct_mapping(mapping):
|
def construct_mapping(mapping):
|
||||||
@ -436,6 +439,8 @@ class BlockStructure(object):
|
|||||||
keys = sorted(element[ish].keys(),key=keyfun)
|
keys = sorted(element[ish].keys(),key=keyfun)
|
||||||
for k in keys:
|
for k in keys:
|
||||||
s+=' '+str(k)+str(element[ish][k])+'\n'
|
s+=' '+str(k)+str(element[ish][k])+'\n'
|
||||||
|
|
||||||
|
s+= "deg_shells "+str( self.deg_shells)+'\n'
|
||||||
return s
|
return s
|
||||||
|
|
||||||
from pytriqs.archive.hdf_archive_schemes import register_class
|
from pytriqs.archive.hdf_archive_schemes import register_class
|
||||||
|
@ -1610,3 +1610,9 @@ class SumkDFT(object):
|
|||||||
def __set_solver_to_sumk_block(self,value):
|
def __set_solver_to_sumk_block(self,value):
|
||||||
self.block_structure.solver_to_sumk_block = value
|
self.block_structure.solver_to_sumk_block = value
|
||||||
solver_to_sumk_block = property(__get_solver_to_sumk_block,__set_solver_to_sumk_block)
|
solver_to_sumk_block = property(__get_solver_to_sumk_block,__set_solver_to_sumk_block)
|
||||||
|
|
||||||
|
def __get_deg_shells(self):
|
||||||
|
return self.block_structure.deg_shells
|
||||||
|
def __set_deg_shells(self,value):
|
||||||
|
self.block_structure.deg_shells = value
|
||||||
|
deg_shells = property(__get_deg_shells,__set_deg_shells)
|
||||||
|
Loading…
Reference in New Issue
Block a user