def get_transop(loc, pos): # get dipole transition operator in local axis dop = edrixs.get_trans_oper('t2gp32') dop_g = np.zeros((2, 3, 6, 4), dtype=np.complex) # transform to golobal axis for i in range(2): for j in range(3): for k in range(3): dop_g[i, j] += loc[i, j, k] * dop[k] # RIXS settings thin, thout, phi = 30 / 180.0 * np.pi, 60 / 180.0 * np.pi, 0.0 ein, eout = 11215.0, 11215.0 # eV # Wavevector kin, kout = edrixs.get_wavevector_rixs(thin, thout, phi, ein, eout) # polarization pi-pi and pi-sigma for key, alpha, beta in [('pp', 0, 0), ('ps', 0, np.pi / 2.0)]: ei, ef = edrixs.dipole_polvec_rixs(thin, thout, phi, alpha, beta) T_i = np.zeros((2, 6, 4), dtype=np.complex) T_f = np.zeros((2, 4, 6), dtype=np.complex) for i in range(2): for j in range(3): T_i[i] += dop_g[i, j] * ei[j] T_f[i] += np.conj(np.transpose(dop_g[i, j] * ef[j])) # multiply phase factor T_i[i] = T_i[i] * np.exp(+1j * np.dot(pos[i], kin)) T_f[i] = T_f[i] * np.exp(-1j * np.dot(pos[i], kout)) transop_rixs_i = np.zeros((20, 20), dtype=np.complex) transop_rixs_f = np.zeros((20, 20), dtype=np.complex) for i in range(2): off1, off2 = i * 6, 12 + i * 4 transop_rixs_i[off1:off1 + 6, off2:off2 + 4] = T_i[i] transop_rixs_f[off2:off2 + 4, off1:off1 + 6] = T_f[i] # write to file edrixs.write_emat(transop_rixs_i, "rixs_" + key + "/transop_rixs_i.in") edrixs.write_emat(transop_rixs_f, "rixs_" + key + "/transop_rixs_f.in") # For XAS, use isotropic polarization ei = np.array([1, 1, 1]) / np.sqrt(3.0) T_i = np.zeros((2, 6, 4), dtype=np.complex) for i in range(2): for j in range(3): T_i[i] += dop_g[i, j] * ei[j] transop_xas = np.zeros((20, 20), dtype=np.complex128) for i in range(2): off1, off2 = i * 6, 12 + i * 4 transop_xas[off1:off1 + 6, off2:off2 + 4] = T_i[i] edrixs.write_emat(transop_xas, "xas/transop_xas.in")
def get_transop(loc, pos): dop = edrixs.get_trans_oper('t2gp') dop_g = np.zeros((2, 3, 6, 6), dtype=np.complex) for i in range(2): dop_g[i, 0] = loc[i, 0, 0] * dop[0] + loc[i, 0, 1] * dop[1] + loc[ i, 0, 2] * dop[2] dop_g[i, 1] = loc[i, 1, 0] * dop[0] + loc[i, 1, 1] * dop[1] + loc[ i, 1, 2] * dop[2] dop_g[i, 2] = loc[i, 2, 0] * dop[0] + loc[i, 2, 1] * dop[1] + loc[ i, 2, 2] * dop[2] # for RIXS thin, thout, phi = 30 / 180.0 * np.pi, 60 / 180.0 * np.pi, 0.0 ein, eout = 11215.0, 11215.0 # eV kin, kout = edrixs.get_wavevector_rixs(thin, thout, phi, ein, eout) # polarization pi-pi and pi-sigma for key, alpha, beta in [('pp', 0, 0), ('ps', 0, np.pi)]: ei, ef = edrixs.dipole_polvec_rixs(thin, thout, phi, alpha, beta) T_i = np.zeros((2, 6, 6), dtype=np.complex) T_o = np.zeros((2, 6, 6), dtype=np.complex) for i in range(2): T_i[i] = (dop_g[i, 0] * ei[0] + dop_g[i, 1] * ei[1] + dop_g[i, 2] * ei[2]) * np.exp(1j * np.dot(pos[i], kin)) T_o[i] = np.exp(-1j * np.dot(pos[i], kout)) * np.conj( np.transpose(dop_g[i, 0] * ef[0] + dop_g[i, 1] * ef[1] + dop_g[i, 2] * ef[2])) transop_rixs_i = np.zeros((24, 24), dtype=np.complex) transop_rixs_f = np.zeros((24, 24), dtype=np.complex) for i in range(2): off1, off2 = i * 6, 12 + i * 6 transop_rixs_i[off1:off1 + 6, off2:off2 + 6] = T_i[i] transop_rixs_f[off2:off2 + 6, off1:off1 + 6] = T_o[i] edrixs.write_emat(transop_rixs_i, "rixs_" + key + "/transop_rixs_i.in") edrixs.write_emat(transop_rixs_f, "rixs_" + key + "/transop_rixs_f.in") # For XAS ei = np.array([1, 1, 1]) / np.sqrt(3.0) T_i = np.zeros((2, 6, 6), dtype=np.complex) for i in range(2): T_i[i] = dop_g[i, 0] * ei[0] + dop_g[i, 1] * ei[1] + dop_g[i, 2] * ei[2] transop_xas = np.zeros((24, 24), dtype=np.complex128) for i in range(2): off1, off2 = i * 6, 12 + i * 6 transop_xas[off1:off1 + 6, off2:off2 + 6] = T_i[i] edrixs.write_emat(transop_xas, "xas/transop_xas.in")
def get_transop(): tmp = edrixs.get_trans_oper('t2gp') dipole = np.zeros((3, 28, 28), dtype=np.complex) for i in range(3): tmp[i] = edrixs.cb_op2(tmp[i], edrixs.tmat_c2j(1), edrixs.tmat_c2j(1)) dipole[i, 0:6, 24:28] = tmp[i, 0:6, 2:6] # for RIXS thin, thout, phi = 45 / 180.0 * np.pi, 45 / 180.0 * np.pi, 0.0 # polarization pi-pi and pi-sigma for key, alpha, beta in [('pp', 0, 0), ('ps', 0, np.pi)]: ei, ef = edrixs.dipole_polvec_rixs(thin, thout, phi, alpha, beta) transop_rixs_i = dipole[0] * ei[0] + dipole[1] * ei[1] + dipole[ 2] * ei[2] transop_rixs_f = np.conj( np.transpose(dipole[0] * ef[0] + dipole[1] * ef[1] + dipole[2] * ef[2])) edrixs.write_emat(transop_rixs_i, "rixs_" + key + "/transop_rixs_i.in") edrixs.write_emat(transop_rixs_f, "rixs_" + key + "/transop_rixs_f.in") # For XAS ei = np.array([1, 1, 1]) / np.sqrt(3.0) transop_xas = dipole[0] * ei[0] + dipole[1] * ei[1] + dipole[2] * ei[2] edrixs.write_emat(transop_xas, "xas/transop_xas.in")
def ed(): # 1-10: Ni-3d valence orbitals, 11-16: Ni-2p core orbitals # Single particle basis: complex shperical Harmonics ndorb, nporb, ntot = 10, 6, 16 emat_i = np.zeros((ntot, ntot), dtype=np.complex) emat_n = np.zeros((ntot, ntot), dtype=np.complex) # 4-index Coulomb interaction tensor, parameterized by # Slater integrals, which are obtained from Cowan's code F2_d, F4_d = 7.9521, 4.9387 # Averaged dd Coulomb interaction is set to be zero F0_d = edrixs.get_F0('d', F2_d, F4_d) G1_dp, G3_dp = 4.0509, 2.3037 # Averaged dp Coulomb interaction is set to be zero F0_dp, F2_dp = edrixs.get_F0('dp', G1_dp, G3_dp), 7.33495 umat_i = edrixs.get_umat_slater( 'dp', F0_d, F2_d, F4_d, # dd 0, 0, 0, 0, # dp 0, 0) # pp umat_n = edrixs.get_umat_slater( 'dp', F0_d, F2_d, F4_d, # dd F0_dp, F2_dp, G1_dp, G3_dp, # dp 0, 0) # pp # Atomic spin-orbit coupling zeta_d, zeta_p = 0.083, 11.24 emat_i[0:ndorb, 0:ndorb] += edrixs.atom_hsoc('d', zeta_d) emat_n[0:ndorb, 0:ndorb] += edrixs.atom_hsoc('d', zeta_d) emat_n[ndorb:ntot, ndorb:ntot] += edrixs.atom_hsoc('p', zeta_p) # Tetragonal crystal field splitting terms, # which are first defined in the real cubic Harmonics basis, # and then transformed to complex shperical Harmonics basis. dt, ds, dq = 0.011428, 0.035714, 0.13 tmp = np.zeros((5, 5), dtype=np.complex) tmp[0, 0] = 6 * dq - 2 * ds - 6 * dt # d3z2-r2 tmp[1, 1] = -4 * dq - 1 * ds + 4 * dt # dzx tmp[2, 2] = -4 * dq - 1 * ds + 4 * dt # dzy tmp[3, 3] = 6 * dq + 2 * ds - 1 * dt # dx2-y2 tmp[4, 4] = -4 * dq + 2 * ds - 1 * dt # dxy tmp[:, :] = edrixs.cb_op(tmp, edrixs.tmat_r2c('d')) emat_i[0:ndorb:2, 0:ndorb:2] += tmp emat_i[1:ndorb:2, 1:ndorb:2] += tmp emat_n[0:ndorb:2, 0:ndorb:2] += tmp emat_n[1:ndorb:2, 1:ndorb:2] += tmp # Build Fock basis in its binary form basis_i = edrixs.get_fock_bin_by_N(ndorb, 8, nporb, nporb) basis_n = edrixs.get_fock_bin_by_N(ndorb, 9, nporb, nporb - 1) ncfg_i, ncfg_n = len(basis_i), len(basis_n) # Build many-body Hamiltonian in Fock basis hmat_i = np.zeros((ncfg_i, ncfg_i), dtype=np.complex) hmat_n = np.zeros((ncfg_n, ncfg_n), dtype=np.complex) hmat_i[:, :] += edrixs.two_fermion(emat_i, basis_i, basis_i) hmat_i[:, :] += edrixs.four_fermion(umat_i, basis_i) hmat_n[:, :] += edrixs.two_fermion(emat_n, basis_n, basis_n) hmat_n[:, :] += edrixs.four_fermion(umat_n, basis_n) # Do exact-diagonalization to get eigenvalues and eigenvectors eval_i, evec_i = np.linalg.eigh(hmat_i) eval_n, evec_n = np.linalg.eigh(hmat_n) # Build dipolar transition operators dipole = np.zeros((3, ntot, ntot), dtype=np.complex) T_abs = np.zeros((3, ncfg_n, ncfg_i), dtype=np.complex) T_emi = np.zeros((3, ncfg_i, ncfg_n), dtype=np.complex) tmp = edrixs.get_trans_oper('dp') for i in range(3): dipole[i, 0:ndorb, ndorb:ntot] = tmp[i] # First, in the Fock basis T_abs[i] = edrixs.two_fermion(dipole[i], basis_n, basis_i) # Then, transfrom to the eigenvector basis T_abs[i] = edrixs.cb_op2(T_abs[i], evec_n, evec_i) T_emi[i] = np.conj(np.transpose(T_abs[i])) return eval_i, eval_n, T_abs, T_emi
print("edrixs >>> Building Hamiltonian with a core-hole ...") eval_n = np.zeros((2, ncfgs_n), dtype=np.float64) evec_n = np.zeros((2, ncfgs_n, ncfgs_n), dtype=np.complex128) for i in range(2): hmat_n[i] += edrixs.two_fermion(emat_n[i], basis_n[i], basis_n[i]) hmat_n[i] += edrixs.four_fermion(umat_n[i], basis_n[i]) eval_n[i], evec_n[i] = scipy.linalg.eigh(hmat_n[i]) print("edrixs >>> Done!") edrixs.write_tensor(eval_i, 'eval_i.dat') edrixs.write_tensor(eval_n, 'eval_n.dat') # Building transition operators print("edrixs >>> building transition operators ...") tran_ptod = edrixs.get_trans_oper('t2gp') for i in range(3): tran_ptod[i, :, :] = edrixs.cb_op2(tran_ptod[i], edrixs.tmat_c2r('t2g', True), edrixs.tmat_c2r('p', True)) dipole_n = np.zeros((2, 3, norbs, norbs), dtype=np.complex128) dipole_n[0, :, 0:6, 12:18] = tran_ptod dipole_n[1, :, 6:12, 18:24] = tran_ptod trop_n = np.zeros((2, 3, ncfgs_n, ncfgs_i), dtype=np.complex128) for i in range(2): for j in range(3): trop_n[i, j] = edrixs.two_fermion(dipole_n[i, j], basis_n[i], basis_i) trop_n[i, j] = edrixs.cb_op2(trop_n[i, j], evec_n[i], evec_i) Ir_trop = np.zeros((2, 3, ncfgs_n, ncfgs_i), dtype=np.complex128)