def __init__(self,Beta,GFstruct,N_Matsubara_Frequencies=1025,**param): """ :param Beta: The inverse temperature :param GFstruct: The structure of the Green's functions. It must be a list of tuples, each representing a block of the Green's function. The tuples have two elements, the name of the block and a list of indices. For example: [ ('up', [1,2,3]), ('down', [1,2,3]) ]. :param N_Matsubara_Frequencies: (Optional, default = 1025) How many Matsubara frequencies are used for the Green's functions. :param param: A list of extra parameters, described below. """ # For backward compatibility self.update_params(param) Parameters.check_no_parameters_not_in_union_of_dicts(param, self.Required, self.Optional) Solver_Base.__init__(self,GFstruct,param) self.Beta = float(Beta) self.Verbosity = 1 if MPI.rank ==0 else 0 # Green function in frequencies a_list = [a for a,al in self.GFStruct] glist = [ GFBloc_ImFreq(Indices = al, Beta = self.Beta, NFreqMatsubara=N_Matsubara_Frequencies) for a,al in self.GFStruct] self.G0 = GF(NameList = a_list, BlockList = glist, Copy=False, Name="G0") self.G = GF(Name_Block_Generator = self.G0, Copy=True, Name="G") self.F = GF(Name_Block_Generator = self.G0, Copy=True, Name="F") self.Sigma = GF(Name_Block_Generator = self.G0, Copy=True, Name="Sigma") self.Sigma_Old = GF(Name_Block_Generator = self.G0, Copy=True, Name="Sigma_Old") self.Name = 'Hybridization Expansion' # first check that all indices of the Green Function do correspond to a C operator. for a,alpha_list in self.GFStruct : for alpha in alpha_list : if (a,alpha) not in Operators.ClistNames() : raise "Error : Some indices (%s,%s) of the Green function do not correspond to existing operator"%(a,alpha)
def __init__(self,Beta,GFstruct,N_Matsubara_Frequencies=1025,**param): """ :param Beta: The inverse temperature :param GFstruct: The structure of the Green's functions. It must be a list of tuples, each representing a block of the Green's function. The tuples have two elements, the name of the block and a list of indices. For example: [ ('up', [1,2,3]), ('down', [1,2,3]) ]. :param N_Matsubara_Frequencies: (Optional, default = 1025) How many Matsubara frequencies are used for the Green's functions. :param param: A list of extra parameters, described below. """ # For backward compatibility self.update_params(param) Parameters.check_no_parameters_not_in_union_of_dicts(param, self.Required, self.Optional) Solver_Base.__init__(self,GFstruct,param) self.Beta = float(Beta) self.Verbosity = 2 if MPI.rank ==0 else 0 # Green function in frequencies a_list = [a for a,al in self.GFStruct] glist = [ GFBloc_ImFreq(Indices = al, Beta = self.Beta, NFreqMatsubara=N_Matsubara_Frequencies) for a,al in self.GFStruct] self.G0 = GF(NameList = a_list, BlockList = glist, Copy=False, Name="G0") self.G = GF(Name_Block_Generator = self.G0, Copy=True, Name="G") self.F = GF(Name_Block_Generator = self.G0, Copy=True, Name="F") self.Sigma = GF(Name_Block_Generator = self.G0, Copy=True, Name="Sigma") self.Sigma_Old = GF(Name_Block_Generator = self.G0, Copy=True, Name="Sigma_Old") self.Name = 'Hybridization Expansion' # first check that all indices of the Green Function do correspond to a C operator. for a,alpha_list in self.GFStruct : for alpha in alpha_list : if (a,alpha) not in Operators.ClistNames() : raise "Error : Some indices (%s,%s) of the Green function do not correspond to existing operator"%(a,alpha)
def __init__(self,Beta,GFstruct,**param): self.Beta = float(Beta) Parameters.check_no_parameters_not_in_union_of_dicts (param,self.Required, self.Optional) #DataTestTools.EnsureAllParametersMakeSense(self,param) if 'Nmsb' not in param : param['Nmsb'] = 1025 if 'Nspin' not in param : param['Nspin'] = 2 Solver_Base.__init__(self,GFstruct,param) # construct Greens functions: self.a_list = [a for a,al in self.GFStruct] glist = lambda : [ GFBloc_ImFreq(Indices = al, Beta = self.Beta, NFreqMatsubara = self.Nmsb) for a,al in self.GFStruct] self.G = GF(NameList = self.a_list, BlockList = glist(),Copy=False) self.G_Old = self.G.copy() self.G0 = self.G.copy() self.Sigma = self.G.copy() self.Sigma_Old = self.G.copy() M = [x for x in self.G.mesh] self.zmsb = numpy.array([x for x in M],numpy.complex_) # for the tails: self.tailtempl={} for sig,g in self.G: self.tailtempl[sig] = copy.deepcopy(g._tail) for i in range(11): self.tailtempl[sig][i].array[:] *= 0.0 self.Name='' # effective atomic levels: if self.UseSpinOrbit: self.NSpin=2 self.ealmat = numpy.zeros([self.Nlm*self.Nspin,self.Nlm*self.Nspin],numpy.complex_)