3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 06:33:48 +01:00
dft_tools/doc/tutorials/images_scripts/Ce-gamma_DOS.py

52 lines
1.5 KiB
Python
Raw Normal View History

from triqs_dft_tools.sumk_dft_tools import *
from triqs_dft_tools.converters.wien2k_converter import *
2014-03-28 23:29:06 +01:00
from pytriqs.applications.impurity_solvers.hubbard_I.hubbard_solver import Solver
2013-08-07 16:40:18 +02:00
# Creates the data directory, cd into it:
#Prepare_Run_Directory(DirectoryName = "Ce-Gamma")
2014-11-18 11:30:26 +01:00
dft_filename = 'Ce-gamma'
beta = 40
2014-03-28 23:29:06 +01:00
U_int = 6.00
J_hund = 0.70
2013-08-07 16:40:18 +02:00
DC_type = 0 # 0...FLL, 1...Held, 2... AMF, 3...Lichtenstein
ommin=-4.0
ommax=6.0
N_om=2001
broadening = 0.02
# Convert DMFT input:
2014-11-18 11:30:26 +01:00
Converter = Wien2kConverter(filename=dft_filename,repacking=True)
Converter.convert_dft_input()
2014-03-28 23:29:06 +01:00
Converter.convert_parproj_input()
2013-08-07 16:40:18 +02:00
# Init the SumK class
2014-11-18 11:30:26 +01:00
SK = SumkDFTTools(hdf_file=dft_filename+'.h5',use_dft_blocks=False)
2013-08-07 16:40:18 +02:00
2015-03-18 20:54:07 +01:00
# load old chemical potential and DC
if mpi.is_master_node():
SK.chemical_potential,SK.dc_imp,SK.dc_energ = SK.load(['chemical_potential','dc_imp','dc_energ'])
SK.chemical_potential = mpi.bcast(SK.chemical_potential)
SK.dc_imp = mpi.bcast(SK.dc_imp)
SK.dc_energ = mpi.bcast(SK.dc_energ)
2013-08-07 16:40:18 +02:00
if (mpi.is_master_node()):
2015-03-18 20:54:07 +01:00
print 'DC after reading SK: ',SK.dc_imp[0]
2013-08-07 16:40:18 +02:00
N = SK.corr_shells[0]['dim']
l = SK.corr_shells[0]['l']
2013-08-07 16:40:18 +02:00
# Init the Solver:
S = Solver(beta = beta, l = l)
2013-08-07 16:40:18 +02:00
# set atomic levels:
eal = SK.eff_atomic_levels()[0]
S.set_atomic_levels( eal = eal )
2015-03-18 20:54:07 +01:00
# Run the solver to get GF and self-energy on the real axis
2014-03-28 23:29:06 +01:00
S.GF_realomega(ommin=ommin, ommax = ommax, N_om=N_om,U_int=U_int,J_hund=J_hund)
SK.set_Sigma([S.Sigma])
2015-03-18 20:54:07 +01:00
# compute DOS
2015-08-14 15:12:35 +02:00
SK.dos_parproj_basis(broadening=broadening)