Skip to content

Commit f93fd82

Browse files
author
Priyanka Seth
committed
Added a wrapper function set_Sigma for more standard API
1 parent 0a07681 commit f93fd82

13 files changed

+18
-17
lines changed

dft_dmft_cthyb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
if mpi.is_master_node(): print "Iteration = ", iteration_number
7878

7979
SK.symm_deg_gf(S.Sigma_iw,orb=0) # symmetrise Sigma
80-
SK.put_Sigma(Sigma_imp = [ S.Sigma_iw ]) # put Sigma into the SumK class
80+
SK.set_Sigma([ S.Sigma_iw ]) # set Sigma into the SumK class
8181
chemical_potential = SK.calc_mu( precision = prec_mu ) # find the chemical potential for given density
8282
S.G_iw << SK.extract_G_loc()[0] # calc the local Green function
8383
mpi.report("Total charge of Gloc : %.6f"%S.G_iw.total_density())

doc/guide/analysis.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ where:
6464
It is important that each data file has to contain three columns: the real frequency mesh, the real part and the imaginary part
6565
of the self energy - exactly in this order! The mesh should be the same for all files read in and non-uniform meshes are not supported.
6666

67-
Finally, we put the self energy into the `SK` object::
67+
Finally, we set the self energy into the `SK` object::
6868

69-
SK.put_Sigma(Sigma_imp = [SigmaReFreq])
69+
SK.set_Sigma([SigmaReFreq])
7070

7171
and additionally set the chemical potential and the double counting correction from the DMFT calculation::
7272
@@ -96,15 +96,15 @@ the output is printed into the files
9696
* `DOS_wannier_(sp)_proj(i)_(m)_(n).dat`: As above, but printed as orbitally-resolved matrix in indices
9797
`(m)` and `(n)`. For `d` orbitals, it gives the DOS separately for, e.g., :math:`d_{xy}`, :math:`d_{x^2-y^2}`, and so on,
9898

99-
otherwise, the ouptput is returned by the function for a further usage in :program:`python`.
99+
otherwise, the output is returned by the function for a further usage in :program:`python`.
100100

101101
Partial charges
102102
---------------
103103

104104
Since we can calculate the partial charges directly from the Matsubara Green's functions, we also do not need a
105105
real frequency self energy for this purpose. The calculation is done by::
106106

107-
SK.put_Sigma(Sigma_imp = SigmaImFreq)
107+
SK.set_Sigma(SigmaImFreq)
108108
dm = SK.partial_charges(beta=40.0, with_Sigma=True, with_dc=True)
109109

110110
which calculates the partial charges using the self energy, double counting, and chemical potential as set in the

doc/guide/dftdmft_selfcons.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ These steps are not necessary, but can help to reduce fluctuations in the total
4141
Now we calculate the modified charge density::
4242

4343
# find exact chemical potential
44-
SK.put_Sigma(Sigma_imp = [ S.Sigma_iw ])
44+
SK.set_Sigma([ S.Sigma_iw ])
4545
chemical_potential = SK.calc_mu( precision = 0.000001 )
4646
dN, d = SK.calc_density_correction(filename = dft_filename+'.qdmft')
4747
SK.save(['chemical_potential','dc_imp','dc_energ'])

doc/guide/dftdmft_singleshot.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ iterations and the self-consistency condition::
5050
n_loops = 5
5151
for iteration_number in range(n_loops) : # start the DMFT loop
5252

53-
SK.put_Sigma(Sigma_imp = [ S.Sigma ]) # Put self energy to the SumK class
53+
SK.set_Sigma([ S.Sigma ]) # Put self energy to the SumK class
5454
chemical_potential = SK.calc_mu() # calculate the chemical potential for the given density
5555
S.G_iw << SK.extract_G_loc()[0] # extract the local Green function
5656
S.G0_iw << inverse(S.Sigma_iw + inverse(S.G_iw)) # finally get G0, the input for the Solver
@@ -239,7 +239,7 @@ refinements::
239239
if mpi.is_master_node(): print "Iteration = ", iteration_number
240240
241241
SK.symm_deg_gf(S.Sigma_iw,orb=0) # symmetrise Sigma
242-
SK.put_Sigma(Sigma_imp = [ S.Sigma_iw ]) # put Sigma into the SumK class
242+
SK.set_Sigma([ S.Sigma_iw ]) # put Sigma into the SumK class
243243
chemical_potential = SK.calc_mu( precision = prec_mu ) # find the chemical potential for given density
244244
S.G_iw << SK.extract_G_loc()[0] # calc the local Green function
245245
mpi.report("Total charge of Gloc : %.6f"%S.G_iw.total_density())

doc/guide/images_scripts/Ce-gamma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
itn = iteration_number + previous_runs
6666

6767
# put Sigma into the SumK class:
68-
SK.put_Sigma(Sigma_imp = [ S.Sigma ])
68+
SK.set_Sigma([ S.Sigma ])
6969

7070
# Compute the SumK, possibly fixing mu by dichotomy
7171
chemical_potential = SK.calc_mu( precision = 0.000001 )

doc/guide/images_scripts/Ce-gamma_DOS.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
# Run the solver to get GF and self-energy on the real axis
4949
S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om,U_int=U_int,J_hund=J_hund)
50-
SK.put_Sigma(Sigma_imp = [S.Sigma])
50+
SK.set_Sigma([S.Sigma])
5151

5252
# compute DOS
5353
SK.dos_parproj_basis(broadening=broadening)

doc/guide/images_scripts/dft_dmft_cthyb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
if mpi.is_master_node(): print "Iteration = ", iteration_number
8383

8484
SK.symm_deg_gf(S.Sigma_iw,orb=0) # symmetrise Sigma
85-
SK.put_Sigma(Sigma_imp = [ S.Sigma_iw ]) # put Sigma into the SumK class
85+
SK.set_Sigma([ S.Sigma_iw ]) # set Sigma into the SumK class
8686
chemical_potential = SK.calc_mu( precision = prec_mu ) # find the chemical potential for given density
8787
S.G_iw << SK.extract_G_loc()[0] # calc the local Green function
8888
mpi.report("Total charge of Gloc : %.6f"%S.G_iw.total_density())

doc/guide/images_scripts/dft_dmft_cthyb_slater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
if mpi.is_master_node(): print "Iteration = ", iteration_number
8484

8585
SK.symm_deg_gf(S.Sigma_iw,orb=0) # symmetrise Sigma
86-
SK.put_Sigma(Sigma_imp = [ S.Sigma_iw ]) # put Sigma into the SumK class
86+
SK.set_Sigma([ S.Sigma_iw ]) # set Sigma into the SumK class
8787
chemical_potential = SK.calc_mu( precision = prec_mu ) # find the chemical potential for given density
8888
S.G_iw << SK.extract_G_loc()[0] # calc the local Green function
8989
mpi.report("Total charge of Gloc : %.6f"%S.G_iw.total_density())

doc/guide/transport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ reads the required data of the Wien2k output and stores it in the `dft_transp_in
8686
Additionally we need to read and set the self energy, the chemical potential and the double counting::
8787

8888
ar = HDFArchive('case.h5', 'a')
89-
SK.put_Sigma(Sigma_imp = [ar['dmft_output']['Sigma_w']])
89+
SK.set_Sigma([ar['dmft_output']['Sigma_w']])
9090
chemical_potential,dc_imp,dc_energ = SK.load(['chemical_potential','dc_imp','dc_energ'])
9191
SK.set_mu(chemical_potential)
9292
SK.set_dc(dc_imp,dc_energ)

python/sumk_dft.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ def lattice_gf(self, ik, mu=None, iw_or_w="iw", beta=40, broadening=None, mesh=N
510510

511511
return G_latt
512512

513+
def set_Sigma(self,Sigma_imp):
514+
self.put_Sigma(Sigma_imp)
513515

514516
def put_Sigma(self, Sigma_imp):
515517
r"""
@@ -557,7 +559,6 @@ def put_Sigma(self, Sigma_imp):
557559
for icrsh in range(self.n_corr_shells):
558560
for bname,gf in SK_Sigma_imp[icrsh]: gf << self.rotloc(icrsh,gf,direction='toGlobal')
559561

560-
561562
def extract_G_loc(self, mu=None, with_Sigma=True, with_dc=True):
562563
r"""
563564
Extracts the local downfolded Green function by the Brillouin-zone integration of the lattice Green's function.

0 commit comments

Comments
 (0)