3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 12:23:41 +01:00

Rename gf_struct_corr to gf_struct_sumk

This commit is contained in:
Priyanka Seth 2014-11-14 11:21:58 +01:00
parent 6708788ed7
commit 01eaad306a
4 changed files with 16 additions and 15 deletions

View File

@ -7,6 +7,7 @@ Substitutions:
* Gupf -> G_upfold * Gupf -> G_upfold
* read_symmetry_input -> convert_symmetry_input * read_symmetry_input -> convert_symmetry_input
* Symm_corr -> symmcorr * Symm_corr -> symmcorr
* gf_struct_corr -> gf_struct_sumk
internal substitutions: internal substitutions:
Symm_par --> symmpar Symm_par --> symmpar

View File

@ -77,7 +77,7 @@ class SumkLDA:
# GF structure used for the local things in the k sums # GF structure used for the local things in the k sums
# Most general form allowing for all hybridisation, i.e. largest blocks possible # Most general form allowing for all hybridisation, i.e. largest blocks possible
self.gf_struct_corr = [ [ (b, range( self.corr_shells[i][3])) for b in self.spin_block_names[self.corr_shells[i][4]] ] self.gf_struct_sumk = [ [ (b, range( self.corr_shells[i][3])) for b in self.spin_block_names[self.corr_shells[i][4]] ]
for i in xrange(self.n_corr_shells) ] for i in xrange(self.n_corr_shells) ]
#----- #-----
@ -417,7 +417,7 @@ class SumkLDA:
self.gf_struct_solver[ish] = {} self.gf_struct_solver[ish] = {}
gf_struct_temp = [] gf_struct_temp = []
block_ind_list = [block for block,inner in self.gf_struct_corr[self.invshellmap[ish]] ] block_ind_list = [block for block,inner in self.gf_struct_sumk[self.invshellmap[ish]] ]
for block in block_ind_list: for block in block_ind_list:
dm = dens_mat[ish][block] dm = dens_mat[ish][block]
dmbool = (abs(dm) > threshold) # gives an index list of entries larger that threshold dmbool = (abs(dm) > threshold) # gives an index list of entries larger that threshold
@ -573,8 +573,8 @@ class SumkLDA:
self.dc_imp = [ {} for i in xrange(self.n_corr_shells)] self.dc_imp = [ {} for i in xrange(self.n_corr_shells)]
for i in xrange(self.n_corr_shells): for i in xrange(self.n_corr_shells):
l = self.corr_shells[i][3] l = self.corr_shells[i][3]
for j in xrange(len(self.gf_struct_corr[i])): for j in xrange(len(self.gf_struct_sumk[i])):
self.dc_imp[i]['%s'%self.gf_struct_corr[i][j][0]] = numpy.zeros([l,l],numpy.float_) self.dc_imp[i]['%s'%self.gf_struct_sumk[i][j][0]] = numpy.zeros([l,l],numpy.float_)
self.dc_energ = [0.0 for i in xrange(self.n_corr_shells)] self.dc_energ = [0.0 for i in xrange(self.n_corr_shells)]
@ -596,9 +596,9 @@ class SumkLDA:
Ncr = {} Ncr = {}
l = self.corr_shells[icrsh][3] #*(1+self.corr_shells[icrsh][4]) l = self.corr_shells[icrsh][3] #*(1+self.corr_shells[icrsh][4])
for j in xrange(len(self.gf_struct_corr[icrsh])): for j in xrange(len(self.gf_struct_sumk[icrsh])):
self.dc_imp[icrsh]['%s'%self.gf_struct_corr[icrsh][j][0]] = numpy.identity(l,numpy.float_) self.dc_imp[icrsh]['%s'%self.gf_struct_sumk[icrsh][j][0]] = numpy.identity(l,numpy.float_)
blname = self.gf_struct_corr[icrsh][j][0] blname = self.gf_struct_sumk[icrsh][j][0]
Ncr[blname] = 0.0 Ncr[blname] = 0.0
for block,inner in self.gf_struct_solver[iorb].iteritems(): for block,inner in self.gf_struct_solver[iorb].iteritems():
@ -608,7 +608,7 @@ class SumkLDA:
M = self.corr_shells[icrsh][3] M = self.corr_shells[icrsh][3]
Ncrtot = 0.0 Ncrtot = 0.0
block_ind_list = [block for block,inner in self.gf_struct_corr[icrsh]] block_ind_list = [block for block,inner in self.gf_struct_sumk[icrsh]]
for bl in block_ind_list: for bl in block_ind_list:
Ncrtot += Ncr[bl] Ncrtot += Ncr[bl]
@ -654,7 +654,7 @@ class SumkLDA:
else: else:
block_ind_list = [block for block,inner in self.gf_struct_corr[icrsh]] block_ind_list = [block for block,inner in self.gf_struct_sumk[icrsh]]
for bl in block_ind_list: for bl in block_ind_list:
self.dc_imp[icrsh][bl] *= use_val self.dc_imp[icrsh][bl] *= use_val
@ -675,11 +675,11 @@ class SumkLDA:
# init self.Sigma_imp: # init self.Sigma_imp:
if all(type(gf) == GfImFreq for bname,gf in Sigma_imp[0]): if all(type(gf) == GfImFreq for bname,gf in Sigma_imp[0]):
# Imaginary frequency Sigma: # Imaginary frequency Sigma:
self.Sigma_imp = [ BlockGf( name_block_generator = [ (block,GfImFreq(indices = inner, mesh = Sigma_imp[0].mesh)) for block,inner in self.gf_struct_corr[i] ], self.Sigma_imp = [ BlockGf( name_block_generator = [ (block,GfImFreq(indices = inner, mesh = Sigma_imp[0].mesh)) for block,inner in self.gf_struct_sumk[i] ],
make_copies = False) for i in xrange(self.n_corr_shells) ] make_copies = False) for i in xrange(self.n_corr_shells) ]
elif all(type(gf) == GfReFreq for bname,gf in Sigma_imp[0]): elif all(type(gf) == GfReFreq for bname,gf in Sigma_imp[0]):
# Real frequency Sigma: # Real frequency Sigma:
self.Sigma_imp = [ BlockGf( name_block_generator = [ (block,GfReFreq(indices = inner, mesh = Sigma_imp[0].mesh)) for block,inner in self.gf_struct_corr[i] ], self.Sigma_imp = [ BlockGf( name_block_generator = [ (block,GfReFreq(indices = inner, mesh = Sigma_imp[0].mesh)) for block,inner in self.gf_struct_sumk[i] ],
make_copies = False) for i in xrange(self.n_corr_shells) ] make_copies = False) for i in xrange(self.n_corr_shells) ]
else: else:
raise ValueError, "This type of Sigma is not handled." raise ValueError, "This type of Sigma is not handled."

View File

@ -166,9 +166,9 @@ class SumkLDATools(SumkLDA):
# init: # init:
Gloc = [] Gloc = []
for icrsh in range(self.n_corr_shells): for icrsh in range(self.n_corr_shells):
b_list = [block for block,inner in self.gf_struct_corr[icrsh]] b_list = [block for block,inner in self.gf_struct_sumk[icrsh]]
#glist = lambda : [ GfReFreq(indices = inner, beta = beta, mesh_array = mesh) for block,inner in self.gf_struct_corr[icrsh]] #glist = lambda : [ GfReFreq(indices = inner, beta = beta, mesh_array = mesh) for block,inner in self.gf_struct_sumk[icrsh]]
glist = lambda : [ GfReFreq(indices = inner, window = (om_min,om_max), n_points = n_om) for block,inner in self.gf_struct_corr[icrsh]] glist = lambda : [ GfReFreq(indices = inner, window = (om_min,om_max), n_points = n_om) for block,inner in self.gf_struct_sumk[icrsh]]
Gloc.append(BlockGf(name_list = b_list, block_list = glist(),make_copies=False)) Gloc.append(BlockGf(name_list = b_list, block_list = glist(),make_copies=False))
for icrsh in xrange(self.n_corr_shells): Gloc[icrsh].zero() # initialize to zero for icrsh in xrange(self.n_corr_shells): Gloc[icrsh].zero() # initialize to zero

View File

@ -73,7 +73,7 @@ class TransBasis:
'''Rotates a given GF into the new basis.''' '''Rotates a given GF into the new basis.'''
# build a full GF # build a full GF
gfrotated = BlockGf( name_block_generator = [ (block,GfImFreq(indices = inner, mesh = gf_to_rot.mesh)) for block,inner in self.SK.gf_struct_corr[0] ], make_copies = False) gfrotated = BlockGf( name_block_generator = [ (block,GfImFreq(indices = inner, mesh = gf_to_rot.mesh)) for block,inner in self.SK.gf_struct_sumk[0] ], make_copies = False)
# transform the CTQMC blocks to the full matrix: # transform the CTQMC blocks to the full matrix:
s = self.SK.shellmap[0] # s is the index of the inequivalent shell corresponding to icrsh s = self.SK.shellmap[0] # s is the index of the inequivalent shell corresponding to icrsh