3
0
mirror of https://github.com/triqs/dft_tools synced 2024-09-27 20:11:00 +02:00

Add wien2k convention to cubic U matrix transformation

This commit is contained in:
Priyanka Seth 2014-12-16 09:36:02 +01:00
parent d385ab8d86
commit 6fb8d9c5cd

View File

@ -75,14 +75,19 @@ def U_matrix_kanamori(n_orb, U_int, J_hund):
return U, Uprime
#FIXME WIEN CONVENTION first eg then t2g
# Get t2g or eg components
def t2g_submatrix(U):
def t2g_submatrix(U, convention=''):
"""Return only the t2g part of the full d-manifold two- or four-index U matrix."""
if convention == 'wien2k':
return subarray(U, len(U.shape)*[(2,3,4)])
else:
return subarray(U, len(U.shape)*[(0,1,3)])
def eg_submatrix(U):
def eg_submatrix(U, convention=''):
"""Return only the eg part of the full d-manifold two- or four-index U matrix."""
if convention == 'wien2k':
return subarray(U, len(U.shape)*[(0,1)])
else:
return subarray(U, len(U.shape)*[(2,4)])
# Transform the interaction matrix into another basis
@ -92,10 +97,12 @@ def transform_U_matrix(U_matrix, T):
# Rotation matrices: complex harmonics to cubic harmonics
# Complex harmonics basis: ..., Y_{-2}, Y_{-1}, Y_{0}, Y_{1}, Y_{2}, ...
def spherical_to_cubic(l):
def spherical_to_cubic(l, convention=''):
"""Returns the spherical harmonics to cubic harmonics rotation matrix."""
size = 2*l+1
T = np.zeros((size,size),dtype=complex)
if convention != 'wien2k' and l != 2:
raise ValueError("spherical_to_cubic: wien2k convention only implemented only for l=2")
if l == 0:
cubic_names = ("s")
elif l == 1:
@ -104,6 +111,14 @@ def spherical_to_cubic(l):
T[1,0] = 1j/sqrt(2); T[1,2] = 1j/sqrt(2)
T[2,1] = 1.0
elif l == 2:
if convention == 'wien2k':
cubic_names = ("z^2","x^2-y^2","xy","yz","xz")
T[0,2] = 1.0
T[1,0] = 1.0/sqrt(2); T[1,4] = 1.0/sqrt(2)
T[2,0] = -1j/sqrt(2); T[2,4] = 1j/sqrt(2)
T[3,1] = 1j/sqrt(2); T[3,3] = -1j/sqrt(2)
T[4,1] = 1.0/sqrt(2); T[4,3] = 1.0/sqrt(2)
else:
cubic_names = ("xy","yz","z^2","xz","x^2-y^2")
T[0,0] = 1j/sqrt(2); T[0,4] = -1j/sqrt(2)
T[1,1] = 1j/sqrt(2); T[1,3] = 1j/sqrt(2)