Skip to content

Commit

Permalink
Merge pull request #51 from TRIQS/uprime_kanamori
Browse files Browse the repository at this point in the history
add possibility to specify Uprime in Kanamori interaction
  • Loading branch information
the-hampel authored Jul 17, 2023
2 parents 62c3e08 + 871de56 commit dcfba1b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
21 changes: 15 additions & 6 deletions python/solid_dmft/dmft_tools/interaction_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

def _extract_U_J_list(param_name, n_inequiv_shells, general_params):
"""
Checks if param_name ('U' or 'J') are a single value or different per
inequivalent shell. If just a single value is given, this value is
applied to each shell.
Checks if param_name ('U', 'U_prime', or 'J') are a single value or
different per inequivalent shell. If just a single value is given,
this value is applied to each shell.
"""

if not isinstance(param_name, str):
Expand Down Expand Up @@ -189,18 +189,25 @@ def _construct_kanamori(sum_k, general_params, icrsh):
mpi.report('warning: are you sure you want to use the kanamori hamiltonian '
+ 'outside the t2g or eg manifold?')

# check if Uprime has been specified manually
if general_params['U_prime'][icrsh] == 'U-2J':
U_prime = general_params['U'][icrsh] - 2.0 * general_params['J'][icrsh]
else:
U_prime = general_params['U_prime'][icrsh]

if general_params['solver_type'] == 'ftps':
# 1-band modell requires J and U' equals zero
if n_orb == 1:
up, j = 0.0, 0.0
else:
up = general_params['U'][icrsh] - 2.0 * general_params['J'][icrsh]
up = U_prime
j = general_params['J'][icrsh]
h_int = ftps.solver_core.HInt(u=general_params['U'][icrsh], j=j, up=up, dd=False)
elif sum_k.SO == 0:
# Constructs U matrix
Umat, Upmat = util.U_matrix_kanamori(n_orb=n_orb, U_int=general_params['U'][icrsh],
J_hund=general_params['J'][icrsh])
J_hund=general_params['J'][icrsh],
Up_int=U_prime)

h_int = util.h_int_kanamori(sum_k.spin_block_names[sum_k.SO], n_orb,
map_operator_structure=sum_k.sumk_to_solver[icrsh],
Expand Down Expand Up @@ -453,7 +460,7 @@ def construct(sum_k, general_params, advanced_params):
Note also that for all Hamiltonians except Kanamori, the order of the
orbitals matters. The correct order is specified here:
https://triqs.github.io/triqs/2.1.x/reference/operators/util/U_matrix.html#triqs.operators.util.U_matrix.spherical_to_cubic
triqs.github.io/triqs/unstable/documentation/python_api/triqs.operators.util.U_matrix.spherical_to_cubic.html
"""

# Extracts U and J
Expand All @@ -462,6 +469,8 @@ def construct(sum_k, general_params, advanced_params):
general_params = _extract_U_J_list('h_int_type', sum_k.n_inequiv_shells, general_params)
for param_name in ('U', 'J'):
general_params = _extract_U_J_list(param_name, sum_k.n_inequiv_shells, general_params)
if 'kanamori' in general_params['h_int_type']:
general_params = _extract_U_J_list('U_prime', sum_k.n_inequiv_shells, general_params)
for param_name in ('dc_U', 'dc_J'):
advanced_params = _extract_U_J_list(param_name, sum_k.n_inequiv_shells, advanced_params)

Expand Down
9 changes: 9 additions & 0 deletions python/solid_dmft/read_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
* 'qe' (equivalent to 'wannier90')
U : float or comma separated list of floats
U values for impurities if only one value is given, the same U is assumed for all impurities
U_prime : float or comma separated list of floats
U prime values for impurities if only one value is given, the same U prime is assumed for all impurities
only used if h_int_type is kanamori
J : float or comma separated list of floats
J values for impurities if only one value is given, the same J is assumed for all impurities
ratio_F4_F2 : float or comma separated list of floats, optional, default='none'
Expand Down Expand Up @@ -451,6 +454,12 @@

'U': {'converter': lambda s: list(map(float, s.split(','))), 'used': True},

'U_prime': {'converter': lambda s: list(map(float, s.split(','))),
'default': ['U-2J'],
'valid for': lambda x, params: all(r == 'U-2J' or hint in ('kanamori')
for r, hint in zip(x, params['general']['h_int_type'])),
'used': True},

'J': {'converter': lambda s: list(map(float, s.split(','))), 'used': True},

'ratio_F4_F2': {'converter': lambda s: list(map(float, s.split(','))),
Expand Down
1 change: 1 addition & 0 deletions test/python/svo_cthyb_basic_tf/dmft_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ n_iw = 501
h_int_type = kanamori
U = 8.0
J = 0.65
U_prime = 6.5

beta = 10

Expand Down
4 changes: 2 additions & 2 deletions test/python/test_read_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_config_file_1():
'dc_type': 0, 'load_sigma': False, 'n_iw': 1025,
'noise_level_initial_sigma': 0.,
'h_int_type': [u'density_density'],
'h_int_basis': 'triqs',
'h_int_basis': 'triqs', 'U_prime' : [u'U-2J'],
'mu_gap_gb2_threshold': 'none',
'calc_mu_method': 'dichotomy'},
'advanced': {'dc_fixed_value': 'none', 'dc_fixed_occ': 'none',
Expand Down Expand Up @@ -223,7 +223,7 @@ def test_config_file_2():
'load_sigma': False, 'n_l': 35, 'n_iw': 1025,
'noise_level_initial_sigma': 0., 'n_iter_dmft': 6,
'h_int_type': [u'kanamori'], 'ratio_F4_F2' : [u'none'],
'h_int_basis': 'triqs',
'h_int_basis': 'triqs', 'U_prime' : [u'U-2J'],
'mu_gap_gb2_threshold': 'none',
'calc_mu_method': 'dichotomy'},
'advanced': {'dc_fixed_value': 'none', 'dc_fixed_occ': 'none',
Expand Down

0 comments on commit dcfba1b

Please sign in to comment.