Skip to content

Commit

Permalink
move imports closer to gw_converter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed May 20, 2024
1 parent 8af80d1 commit 13fb7ea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions python/solid_dmft/dmft_tools/initial_self_energies.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@
from h5 import HDFArchive
import triqs.utility.mpi as mpi
from triqs.gf import BlockGf, Gf, make_gf_imfreq, MeshDLRImFreq, make_gf_dlr, MeshReFreq
from triqs.operators import util
import itertools

from solid_dmft.gw_embedding.bdft_converter import calc_Sigma_DC_gw, calc_W_from_Gloc, convert_gw_output

def calculate_double_counting(sum_k, density_matrix, general_params, gw_params, advanced_params, solver_type_per_imp, G_loc_all=None):
"""
Calculates the double counting, including all manipulations from advanced_params.
Expand Down Expand Up @@ -112,6 +109,7 @@ def calculate_double_counting(sum_k, density_matrix, general_params, gw_params,
orb=icrsh, use_dc_formula=0)
# DC calculated for dynamic interaction from AIMBES
elif general_params['dc_type'][icrsh] in ('crpa_static', 'crpa_static_qp', 'crpa_dynamic'):
from solid_dmft.gw_embedding.bdft_converter import calc_Sigma_DC_gw, calc_W_from_Gloc, convert_gw_output
mpi.report('\n*** Using dynamic interactions to calculate DC ***')

# lad GW input from h5 file
Expand Down
2 changes: 1 addition & 1 deletion python/solid_dmft/dmft_tools/interaction_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from triqs.gf import make_gf_imfreq
from triqs.operators import util, n, c, c_dag, Operator
from solid_dmft.dmft_tools import solver
from solid_dmft.gw_embedding.bdft_converter import convert_gw_output


try:
Expand Down Expand Up @@ -91,6 +90,7 @@ def _round_to_int(data):
print('Warning: different number of orbitals in cRPA matrix than in calculation.')

elif gw_params['code'] == 'aimbes':
from solid_dmft.gw_embedding.bdft_converter import convert_gw_output
u_matrix_four_indices_per_shell = []
# lad GW input from h5 file
if mpi.is_master_node():
Expand Down
2 changes: 0 additions & 2 deletions python/solid_dmft/gw_embedding/bdft_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
converter from bdft output to edmft input for solid_dmft
"""

from os import stat
import numpy as np
from scipy.constants import physical_constants

Expand All @@ -38,7 +37,6 @@
BlockGf,
make_gf_dlr_imtime,
make_gf_dlr,
make_gf_imfreq,
make_gf_dlr_imfreq,
)
from triqs.gf.meshes import MeshDLRImFreq, MeshDLRImTime
Expand Down

0 comments on commit 13fb7ea

Please sign in to comment.