3
0
mirror of https://github.com/triqs/dft_tools synced 2025-04-30 20:25:06 +02:00

[doc] add measure_density_matrix to all cthyb tutorial using tail_fit

This commit is contained in:
the-hampel 2025-04-16 09:33:27 +02:00
parent b9ed39d59a
commit bb9567aa64
9 changed files with 35 additions and 8 deletions

View File

@ -16,7 +16,7 @@ SK.calculate_diagonalization_matrix(prop_to_be_diagonal='eal',calc_in_solver_blo
###########################
# Now we pick the orbitals:
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
# AND IS DIFFERENT FORM CASE TO CASE!
SK.block_structure.pick_gf_struct_solver([{'ud_0': [0,1,2],'ud_1': [0,1,2]}])
###########################
@ -49,6 +49,9 @@ p["perform_tail_fit"] = True
p["fit_max_moment"] = 4
p["fit_min_w"] = 4.0
p["fit_max_w"] = 8.0
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
# double counting correction:
dc_type = 0 # FLL
@ -64,7 +67,7 @@ if mpi.is_master_node():
for iteration_number in range(1,n_loops+1):
mpi.report("Iteration = %s"%iteration_number)
SK.set_Sigma([ S.Sigma_iw ]) # put Sigma into the SumK class
chemical_potential = SK.calc_mu( precision = 0.01 ) # find the chemical potential for given density
S.G_iw << SK.extract_G_loc()[0]
@ -109,4 +112,4 @@ for iteration_number in range(1,n_loops+1):
# Save stuff into the user_data group of hdf5 archive in case of rerun:
SK.save(['chemical_potential','dc_imp','dc_energ'])

View File

@ -21,7 +21,7 @@ SK.calculate_diagonalization_matrix(prop_to_be_diagonal='eal',calc_in_solver_blo
###########################
# Now we pick the orbitals:
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
# BE CAREFUL: THIS NEEDS TO BE DONE PROPERLY
# AND IS DIFFERENT FORM CASE TO CASE!
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]}])
###########################
@ -52,6 +52,9 @@ p["perform_tail_fit"] = True
p["fit_max_moment"] = 4
p["fit_min_n"] = 30
p["fit_max_n"] = 70
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
# double counting correction:
dc_type = 0 # FLL
@ -67,7 +70,7 @@ if mpi.is_master_node():
for iteration_number in range(1,n_loops+1):
mpi.report("Iteration = %s"%iteration_number)
SK.symm_deg_gf(S.Sigma_iw) # symmetrizing Sigma
SK.set_Sigma([ S.Sigma_iw ]) # put Sigma into the SumK class
chemical_potential = SK.calc_mu( precision = 0.01 ) # find the chemical potential for given density
@ -113,5 +116,5 @@ for iteration_number in range(1,n_loops+1):
# Save stuff into the user_data group of hdf5 archive in case of rerun:
SK.save(['chemical_potential','dc_imp','dc_energ'])

View File

@ -43,6 +43,9 @@ p["perform_tail_fit"] = True
p["fit_max_moment"] = 4
p["fit_min_n"] = 30
p["fit_max_n"] = 60
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
# If conversion step was not done, we could do it here. Uncomment the lines it you want to do this.
#from triqs_dft_tools.converters.wien2k import *

View File

@ -73,6 +73,9 @@ p["fit_max_moment"] = 4
p["fit_min_w"] = 20
p["fit_max_w"] = 30
p["perform_tail_fit"] = True
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
# Double Counting: 0 FLL, 1 Held, 2 AMF
DC_type = 0

View File

@ -79,6 +79,9 @@ def dmft_cycle():
p["fit_min_w"] = 20
p["fit_max_w"] = 30
p["perform_tail_fit"] = True
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
# Double Counting: 0 FLL, 1 Held, 2 AMF
DC_type = 0

View File

@ -158,6 +158,9 @@ Now we have the interaction Hamiltonian for the solver, which we set up next::
p["fit_max_moment"] = 4
p["fit_min_n"] = 40
p["fit_max_n"] = 100
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
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
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.
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.
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.

View File

@ -156,6 +156,9 @@ Now we have the interaction Hamiltonian for the solver, which we set up next::
p["fit_max_moment"] = 4
p["fit_min_w"] = 4.0
p["fit_max_w"] = 8.0
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
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
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.
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.
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.

View File

@ -124,6 +124,9 @@ of parameters for a first guess is::
p["fit_max_moment"] = 4
p["fit_min_n"] = 30
p["fit_max_n"] = 60
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
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 the user to

View File

@ -85,6 +85,9 @@ We also have to specify the `CTHYB solver <https://triqs.github.io/cthyb/latest>
p["fit_max_moment"] = 4
p["fit_min_n"] = 30
p["fit_max_n"] = 60
# measure impurity density matrix to get self-energy moments for improved tail fit
p["measure_density_matrix"] = True
p["use_norm_as_weight"] = True
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>`.