Skip to content

Commit bb9567a

Browse files
committed
[doc] add measure_density_matrix to all cthyb tutorial using tail_fit
1 parent b9ed39d commit bb9567a

File tree

9 files changed

+35
-8
lines changed

9 files changed

+35
-8
lines changed

doc/tutorials/images_scripts/Sr2MgOsO6_SOC.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
###########################
1818
# Now we pick the orbitals:
19-
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
19+
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
2020
# AND IS DIFFERENT FORM CASE TO CASE!
2121
SK.block_structure.pick_gf_struct_solver([{'ud_0': [0,1,2],'ud_1': [0,1,2]}])
2222
###########################
@@ -49,6 +49,9 @@
4949
p["fit_max_moment"] = 4
5050
p["fit_min_w"] = 4.0
5151
p["fit_max_w"] = 8.0
52+
# measure impurity density matrix to get self-energy moments for improved tail fit
53+
p["measure_density_matrix"] = True
54+
p["use_norm_as_weight"] = True
5255

5356
# double counting correction:
5457
dc_type = 0 # FLL
@@ -64,7 +67,7 @@
6467
for iteration_number in range(1,n_loops+1):
6568

6669
mpi.report("Iteration = %s"%iteration_number)
67-
70+
6871
SK.set_Sigma([ S.Sigma_iw ]) # put Sigma into the SumK class
6972
chemical_potential = SK.calc_mu( precision = 0.01 ) # find the chemical potential for given density
7073
S.G_iw << SK.extract_G_loc()[0]
@@ -109,4 +112,4 @@
109112

110113
# Save stuff into the user_data group of hdf5 archive in case of rerun:
111114
SK.save(['chemical_potential','dc_imp','dc_energ'])
112-
115+

doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
###########################
2323
# Now we pick the orbitals:
24-
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
24+
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
2525
# AND IS DIFFERENT FORM CASE TO CASE!
2626
SK.block_structure.pick_gf_struct_solver([{'up_1': [0],'up_2': [0],'up_3': [0],'down_1': [0],'down_2': [0],'down_3': [0]}])
2727
###########################
@@ -52,6 +52,9 @@
5252
p["fit_max_moment"] = 4
5353
p["fit_min_n"] = 30
5454
p["fit_max_n"] = 70
55+
# measure impurity density matrix to get self-energy moments for improved tail fit
56+
p["measure_density_matrix"] = True
57+
p["use_norm_as_weight"] = True
5558

5659
# double counting correction:
5760
dc_type = 0 # FLL
@@ -67,7 +70,7 @@
6770
for iteration_number in range(1,n_loops+1):
6871

6972
mpi.report("Iteration = %s"%iteration_number)
70-
73+
7174
SK.symm_deg_gf(S.Sigma_iw) # symmetrizing Sigma
7275
SK.set_Sigma([ S.Sigma_iw ]) # put Sigma into the SumK class
7376
chemical_potential = SK.calc_mu( precision = 0.01 ) # find the chemical potential for given density
@@ -113,5 +116,5 @@
113116

114117
# Save stuff into the user_data group of hdf5 archive in case of rerun:
115118
SK.save(['chemical_potential','dc_imp','dc_energ'])
116-
119+
117120

doc/tutorials/images_scripts/dft_dmft_cthyb.py

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
p["fit_max_moment"] = 4
4444
p["fit_min_n"] = 30
4545
p["fit_max_n"] = 60
46+
# measure impurity density matrix to get self-energy moments for improved tail fit
47+
p["measure_density_matrix"] = True
48+
p["use_norm_as_weight"] = True
4649

4750
# If conversion step was not done, we could do it here. Uncomment the lines it you want to do this.
4851
#from triqs_dft_tools.converters.wien2k import *

doc/tutorials/nio_csc_vasp/nio.py

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
p["fit_min_w"] = 20
7474
p["fit_max_w"] = 30
7575
p["perform_tail_fit"] = True
76+
# measure impurity density matrix to get self-energy moments for improved tail fit
77+
p["measure_density_matrix"] = True
78+
p["use_norm_as_weight"] = True
7679

7780
# Double Counting: 0 FLL, 1 Held, 2 AMF
7881
DC_type = 0

doc/tutorials/nio_csc_vasp/nio_csc.py

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ def dmft_cycle():
7979
p["fit_min_w"] = 20
8080
p["fit_max_w"] = 30
8181
p["perform_tail_fit"] = True
82+
# measure impurity density matrix to get self-energy moments for improved tail fit
83+
p["measure_density_matrix"] = True
84+
p["use_norm_as_weight"] = True
8285

8386
# Double Counting: 0 FLL, 1 Held, 2 AMF
8487
DC_type = 0

doc/tutorials/sr2mgoso6_nosoc.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ Now we have the interaction Hamiltonian for the solver, which we set up next::
158158
p["fit_max_moment"] = 4
159159
p["fit_min_n"] = 40
160160
p["fit_max_n"] = 100
161+
# measure impurity density matrix to get self-energy moments for improved tail fit
162+
p["measure_density_matrix"] = True
163+
p["use_norm_as_weight"] = True
161164

162165

163166
The DMFT loop with automatic basis rotations
@@ -210,4 +213,4 @@ The only difference to the other example is in the initialisation of the real pa
210213

211214
The two :math:`d_{xz}` and :math:`d_{yz}` orbitals are degenerate (blocks *up_2* and *up_3*), whereas the :math:`d_{xy}`-like orbital is different.
212215

213-
A complete python script for this tutorial, including some more input/output, is available (:download:`Sr2MgOsO6_noSOC.py <images_scripts/Sr2MgOsO6_noSOC.py>`). When running the script, you will encounter warnings during the transformation from the *sumk* to the *solver* basis. These warnings just reflect that the off-diagonal elements of the full Greens function are not zero at all frequencies, although the local Hamiltonian is. In that sense, we still do an approximation when restricting ourselves to the :math:`t_{2g}`-like orbitals.
216+
A complete python script for this tutorial, including some more input/output, is available (:download:`Sr2MgOsO6_noSOC.py <images_scripts/Sr2MgOsO6_noSOC.py>`). When running the script, you will encounter warnings during the transformation from the *sumk* to the *solver* basis. These warnings just reflect that the off-diagonal elements of the full Greens function are not zero at all frequencies, although the local Hamiltonian is. In that sense, we still do an approximation when restricting ourselves to the :math:`t_{2g}`-like orbitals.

doc/tutorials/sr2mgoso6_soc.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ Now we have the interaction Hamiltonian for the solver, which we set up next::
156156
p["fit_max_moment"] = 4
157157
p["fit_min_w"] = 4.0
158158
p["fit_max_w"] = 8.0
159+
# measure impurity density matrix to get self-energy moments for improved tail fit
160+
p["measure_density_matrix"] = True
161+
p["use_norm_as_weight"] = True
159162

160163

161164
The DMFT loop with automatic basis rotations
@@ -224,4 +227,4 @@ The imaginary part of the self energy matrix of the *ud_0* block looks like this
224227

225228
Plotted on the same scale, the off-diagonal elements are very small, only the *(1,2)* and *(2,1)* elements are visibly different from zero.
226229

227-
A complete python script for this tutorial, including some more input/output, is available (:download:`Sr2MgOsO6_SOC.py <images_scripts/Sr2MgOsO6_SOC.py>`). When running the script, you will encounter warnings during the transformation from the *sumk* to the *solver* basis. These warnings just reflect that the off-diagonal elements of the full Greens function are not zero at all frequencies, although the local Hamiltonian is. In that sense, we still do an approximation when restricting ourselves to the low-energy subset.
230+
A complete python script for this tutorial, including some more input/output, is available (:download:`Sr2MgOsO6_SOC.py <images_scripts/Sr2MgOsO6_SOC.py>`). When running the script, you will encounter warnings during the transformation from the *sumk* to the *solver* basis. These warnings just reflect that the off-diagonal elements of the full Greens function are not zero at all frequencies, although the local Hamiltonian is. In that sense, we still do an approximation when restricting ourselves to the low-energy subset.

doc/tutorials/srvo3.rst

+3
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ of parameters for a first guess is::
124124
p["fit_max_moment"] = 4
125125
p["fit_min_n"] = 30
126126
p["fit_max_n"] = 60
127+
# measure impurity density matrix to get self-energy moments for improved tail fit
128+
p["measure_density_matrix"] = True
129+
p["use_norm_as_weight"] = True
127130

128131
Here we use a tail fit to deal with numerical noise of higher Matsubara frequencies.
129132
For other options and more details on the solver parameters, we refer the user to

doc/tutorials/svo_elk/srvo3.rst

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ We also have to specify the `CTHYB solver <https://triqs.github.io/cthyb/latest>
8585
p["fit_max_moment"] = 4
8686
p["fit_min_n"] = 30
8787
p["fit_max_n"] = 60
88+
# measure impurity density matrix to get self-energy moments for improved tail fit
89+
p["measure_density_matrix"] = True
90+
p["use_norm_as_weight"] = True
8891

8992
Here we use a tail fit to deal with numerical noise of higher Matsubara frequencies. For other options and more details on the solver parameters, we refer to the `CTHYB solver <https://triqs.github.io/cthyb/latest/reference/constr_parameters.html>`_ documentation. It is important to note that the solver parameters have to be adjusted for each material individually. A guide on how to set the tail fit parameters is given :ref:`below <tailfit>`.
9093

0 commit comments

Comments
 (0)