From 72c7f57110e6eacb470f50f5b45a7a45263dad89 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 30 Apr 2018 19:00:08 +0200 Subject: [PATCH] Fix #89 Adjustments after recent triqs/cthyb gf_struct typechange -Adjust gf_struct keyword argument of CTHyb from dict : str -> indices to list of pairs: [ [str, indices], ... ] in accordance with recent cthyb/triqs changes -Fix set_operator_structure in srvo3_Gloc.py test accordingly -TODO: Adjust gf_struct appearences throughout dft_tools accordingly --- dft_dmft_cthyb.py | 2 +- doc/guide/SrVO3.rst | 2 +- doc/guide/images_scripts/dft_dmft_cthyb.py | 2 +- doc/guide/images_scripts/dft_dmft_cthyb_slater.py | 2 +- test/srvo3_Gloc.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dft_dmft_cthyb.py b/dft_dmft_cthyb.py index be87a74d..0ca76b16 100644 --- a/dft_dmft_cthyb.py +++ b/dft_dmft_cthyb.py @@ -57,7 +57,7 @@ gf_struct = SK.gf_struct_solver[0] Umat, Upmat = U_matrix_kanamori(n_orb=n_orb, U_int=U, J_hund=J) # Construct Hamiltonian and solver h_int = h_int_density(spin_names, orb_names, map_operator_structure=SK.sumk_to_solver[0], U=Umat, Uprime=Upmat, H_dump="H.txt") -S = Solver(beta=beta, gf_struct=gf_struct) +S = Solver(beta=beta, gf_struct=list(gf_struct)) if previous_present: chemical_potential = 0 diff --git a/doc/guide/SrVO3.rst b/doc/guide/SrVO3.rst index f9770b32..cbd77d4b 100644 --- a/doc/guide/SrVO3.rst +++ b/doc/guide/SrVO3.rst @@ -104,7 +104,7 @@ Kanamori definitions of :math:`U` and :math:`J`. Next, we construct the Hamiltonian and the solver:: h_int = h_int_density(spin_names, orb_names, map_operator_structure=SK.sumk_to_solver[0], U=Umat, Uprime=Upmat) - S = Solver(beta=beta, gf_struct=gf_struct) + S = Solver(beta=beta, gf_struct=list(gf_struct)) As you see, we take only density-density interactions into account. Other Hamiltonians with, e.g. with full rotational invariant interactions are: diff --git a/doc/guide/images_scripts/dft_dmft_cthyb.py b/doc/guide/images_scripts/dft_dmft_cthyb.py index c0ef8cd6..51c7ce93 100644 --- a/doc/guide/images_scripts/dft_dmft_cthyb.py +++ b/doc/guide/images_scripts/dft_dmft_cthyb.py @@ -65,7 +65,7 @@ Umat, Upmat = U_matrix_kanamori(n_orb=n_orb, U_int=U, J_hund=J) # Construct density-density Hamiltonian and solver h_int = h_int_density(spin_names, orb_names, map_operator_structure=SK.sumk_to_solver[0], U=Umat, Uprime=Upmat, H_dump="H.txt") -S = Solver(beta=beta, gf_struct=gf_struct) +S = Solver(beta=beta, gf_struct=list(gf_struct)) if previous_present: chemical_potential = 0 diff --git a/doc/guide/images_scripts/dft_dmft_cthyb_slater.py b/doc/guide/images_scripts/dft_dmft_cthyb_slater.py index a0c97304..62079b1b 100644 --- a/doc/guide/images_scripts/dft_dmft_cthyb_slater.py +++ b/doc/guide/images_scripts/dft_dmft_cthyb_slater.py @@ -66,7 +66,7 @@ Umat = U_matrix(n_orb=n_orb, U_int=U, J_hund=J, basis='cubic',) # Construct Hamiltonian and solver h_int = h_int_slater(spin_names, orb_names, map_operator_structure=SK.sumk_to_solver[0], U_matrix=Umat) -S = Solver(beta=beta, gf_struct=gf_struct) +S = Solver(beta=beta, gf_struct=list(gf_struct)) if previous_present: chemical_potential = 0 diff --git a/test/srvo3_Gloc.py b/test/srvo3_Gloc.py index f10555e4..16988433 100644 --- a/test/srvo3_Gloc.py +++ b/test/srvo3_Gloc.py @@ -40,8 +40,8 @@ orb_names = ['%s'%i for i in range(num_orbitals)] orb_hybridized = False gf_struct = set_operator_structure(spin_names,orb_names,orb_hybridized) -glist = [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct.iteritems()] -Sigma_iw = BlockGf(name_list = gf_struct.keys(), block_list = glist, make_copies = False) +glist = [ GfImFreq(indices=inner,beta=beta) for block,inner in gf_struct] +Sigma_iw = BlockGf(name_list = [block for block,inner in gf_struct], block_list = glist, make_copies = False) SK.set_Sigma([Sigma_iw]) Gloc = SK.extract_G_loc()