Skip to content

Commit

Permalink
Update sumk_dft_transport.py
Browse files Browse the repository at this point in the history
Raman conductivity in atomic units.
  • Loading branch information
gblesio authored and the-hampel committed Aug 15, 2024
1 parent 6dde56d commit 4711e1d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/triqs_dft_tools/sumk_dft_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ def _commutator(A, B):

if calc_inverse_mass:
# in the band basis
# ToDo: change units of inverse_mass consistently
if oc_basis == 'h':
inverse_mass = dataK.Xbar('Ham', 2)
# in the orbital basis
Expand All @@ -348,6 +347,7 @@ def _commutator(A, B):
Hw_alphabeta_R = 1j * Hw_alphabeta_R.reshape((Hw_alphabeta_R.shape) + (1, )) * dataK.cRvec_wcc.reshape(
(shape_cR[0], shape_cR[1], dataK.system.nRvec) + (1, ) * len(Hw_alphabeta_R.shape[3:]) + (3, ))
inverse_mass = dataK.fft_R_to_k(Hw_alphabeta_R, hermitean=False)[dataK.select_K]
inverse_mass = inverse_mass / HARTREETOEV / BOHRTOANG**2
# read in rest from dataK
cell_volume = dataK.cell_volume / BOHRTOANG ** 3
kpts = dataK.kpoints_all
Expand Down Expand Up @@ -427,7 +427,7 @@ def raman_vertex(sumk,ik,direction,code,isp, options=None):
numpy array size [n_orb, n_orb] of complex type
"""
if code in ('wien2k'):
assert 0, 'Raman for wien2k not yet implemented' #ToDo
assert 0, 'Raman for wien2k not yet implemented'
dir_names=['xx','yy','zz','B2g','B1g','A1g','Eg']
dir_array=[ [[1.,0.,0.],[0.,0.,0.],[0.,0.,0.]],
[[0.,0.,0.],[0.,1.,0.],[0.,0.,0.]],
Expand Down Expand Up @@ -744,7 +744,7 @@ def glist(): return [GfReFreq(target_shape=(block_dim, block_dim), window=(omega
if code in ('wannier90'):
assert hasattr(sum_k,"inverse_mass"), 'inverse_mass not available in sum_k. Set calc_inverse_mass=True in w90_params.'
elif code in ('wien2k'):
assert 0, 'Raman for wien2k not yet implemented' #ToDo
assert 0, 'Raman for wien2k not yet implemented'
# loop over all symmetries
for R in sum_k.rot_symmetries:
for direction in directions:
Expand Down Expand Up @@ -1001,15 +1001,15 @@ def conductivity_and_seebeck(Gamma_w, omega, Om_mesh, SP, directions, beta, meth
else:
return optic_cond, seebeck, kappa
elif mode in ('raman'):
# ToDo: correct units
# TODO: express in SI units
raman_cond = {direction: numpy.full((n_q,), numpy.nan) for direction in directions}

for direction in directions:
for iq in range(n_q):
A0[direction][iq] = transport_coefficient(Gamma_w, omega, Om_mesh, SP, direction, iq=iq, n=0, beta=beta, method=method)
print("A_0 in direction %s for Omega = %.2f %e a.u." % (direction, Om_mesh[iq], A0[direction][iq]))
raman_cond[direction] = beta * A0[direction] * 10700.0 / numpy.pi
print("A_0 in direction %s for Omega = %.2f %e atomic units" % (direction, Om_mesh[iq], A0[direction][iq]))
raman_cond[direction] = beta * A0[direction]
for iq in range(n_q):
print("Raman conductivity in direction %s for Omega = %.2f %f x 10^4 Ohm^-1 cm^-1" % (direction, Om_mesh[iq], raman_cond[direction][iq]))
print("Raman conductivity in direction %s for Omega = %.4f %f atomic units" % (direction, Om_mesh[iq], raman_cond[direction][iq]))

return raman_cond

0 comments on commit 4711e1d

Please sign in to comment.