Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to Sr2RuO4_SOC #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions Sr2RuO4_SOC/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,25 @@
from triqs.operators import c, c_dag, n
from triqs.operators.util import h_int_kanamori, U_matrix_kanamori
from itertools import product
import numpy as np
from numpy import matrix, array, diag, pi
import numpy.linalg as linalg

from tight_binding_model import *
from triqs.lattice.utils import TB_from_wannier90

# order is xy_up, xz_up, yz_up, xy_dn, xz_dn, yz_dn
# could be replaced by triqs_dft_tools/converters/wannier90.py: generate_local_so_matrix_t2g()
# but different orbital order (xz_up, xz_dn, yz_up, yz_dn, xy_up, xy_dn)
def lambda_matrix(lam_xy, lam_z):
lam_loc = np.zeros((6,6),dtype=complex)
lam_loc[0,4] = 1j*lam_xy/2.0
lam_loc[0,5] = lam_xy/2.0
lam_loc[1,2] = 1j*lam_z/2.0
lam_loc[1,3] = -1j*lam_xy/2.0
lam_loc[2,3] = -lam_xy/2.0
lam_loc[4,5] = -1j*lam_z/2.0
lam_loc = lam_loc + np.transpose(np.conjugate(lam_loc))
return lam_loc

# ==== System Parameters ====
beta = 25. # Inverse temperature
Expand All @@ -26,40 +41,46 @@
block_names = ['up', 'dn'] # The spins
orb_names = [0, 1, 2] # The orbitals
idx_lst = list(range(len(block_names) * len(orb_names)))
gf_struct = [('bl', idx_lst)]

TBL = tight_binding_model(lambda_soc=SOC) # The Tight-Binding Lattice
n_orb = len(idx_lst)

paths = [os.getcwd(), os.path.dirname(__file__)]
for p in paths:
if os.path.isfile(p + '/w2w_hr.dat'):
path = p
break
TBL = TB_from_wannier90(seed='/w2w', path=path, extend_to_spin=True, add_local=lambda_matrix(SOC, SOC))
TBL.bz = BrillouinZone(TBL.bl)
n_idx = len(idx_lst)


# ==== Local Hamiltonian ====
c_dag_vec = matrix([[c_dag('bl', idx) for idx in idx_lst]])
c_vec = matrix([[c('bl', idx)] for idx in idx_lst])

h_0_mat = TBL._hop[(0,0,0)]
h_0_mat = TBL.hoppings[(0,0,0)]
h_0 = (c_dag_vec * h_0_mat * c_vec)[0,0]

Umat, Upmat = U_matrix_kanamori(len(orb_names), U_int=U, J_hund=J)
op_map = { (s,o): ('bl',i) for i, (s,o) in enumerate(product(block_names, orb_names)) }
h_int = h_int_kanamori(block_names, len(orb_names), Umat, Upmat, J, off_diag=True, map_operator_structure=op_map)

h_imp = h_0 + h_int


# ==== Non-Interacting Impurity Green function ====
gf_struct = [('bl', len(idx_lst))]

iw_mesh = MeshImFreq(beta, 'Fermion', n_iw)
k_mesh = MeshBrZone(TBL.bz, n_k)
k_iw_mesh = MeshProduct(k_mesh, iw_mesh)

G0_k_iw = BlockGf(mesh=k_iw_mesh, gf_struct=gf_struct)
G0_iw = BlockGf(mesh=iw_mesh, gf_struct=gf_struct)

iw_vec = array([iw.value * np.eye(n_idx) for iw in iw_mesh])
k_vec = array([k.value for k in k_mesh])
e_k_vec = TBL.hopping(k_vec.T.copy() / 2. / pi).transpose(2, 0, 1)
mu_mat = mu * np.eye(n_idx)
iw_vec = array([iw.value * np.eye(n_orb) for iw in iw_mesh])
e_k = TBL.fourier(k_mesh)[0:n_orb,0:n_orb]
mu_mat = mu * np.eye(n_orb)

G0_k_iw['bl'].data[:] = linalg.inv(iw_vec[None,...] + mu_mat[None,None,...] - e_k_vec[::,None,...])
G0_k_iw['bl'].data[:] = linalg.inv(iw_vec[None,...] + mu_mat[None,None,...] - e_k.data[::,None,...])
G0_iw['bl'].data[:] = np.sum(G0_k_iw['bl'].data[:], axis=0) / len(k_mesh)


Expand Down
96 changes: 0 additions & 96 deletions Sr2RuO4_SOC/tight_binding_model.py

This file was deleted.