Skip to content

Commit

Permalink
Changes in WB and adjustment of error message
Browse files Browse the repository at this point in the history
  • Loading branch information
phibeck committed Jul 17, 2024
1 parent d1f118a commit e8b877d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/triqs_dft_tools/sumk_dft_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def recompute_w90_input_on_different_mesh(sum_k, seedname, nk_optics, pathname='
try:
import wannierberri as wb
except ImportError:
print('ImportError: WannierBerri needs to be installed to run test "Py_w90_optics_Sr2RuO4"')
print('ImportError: WannierBerri needs to be installed to run optics calculations with Wannier90')
try:
mpi.MPI.COMM_WORLD.Abort(1)
except:
Expand All @@ -269,7 +269,7 @@ def recompute_w90_input_on_different_mesh(sum_k, seedname, nk_optics, pathname='
# if there's a segfault, uncomment the following line
wberri = wb.System_w90(pathname + seedname, berry=True, fft='numpy', npar=16)
grid = wb.Grid(wberri, NKdiv=1, NKFFT=[nk_x, nk_y, nk_z])
dataK = wb.data_K.Data_K(wberri, dK=shift_gamma, grid=grid, fftlib='numpy')
dataK = wb.data_K.Data_K_R(wberri, dK=shift_gamma, grid=grid, fftlib='numpy')

assert dataK.HH_K.shape == hopping[:, 0, :, :].shape, 'wberri / wannier Hamiltonian has different number of orbitals than SumK object. Disentanglement is not supported as of now.'

Expand Down Expand Up @@ -335,7 +335,7 @@ def _commutator(A, B):
(shape_cR[0], shape_cR[1], dataK.system.nRvec) + (1, ) * len(Hw_alpha_R.shape[3:]) + (3, ))
Hw_alpha = dataK.fft_R_to_k(Hw_alpha_R, hermitean=False)[dataK.select_K]
# second term
Aw_alpha = dataK.fft_R_to_k(dataK.AA_R, hermitean=True)
Aw_alpha = dataK.fft_R_to_k(dataK.get_R_mat('AA'), hermitean=True)
c_Hw_Aw_alpha = _commutator(hopping[:, 0, :, :], Aw_alpha)
velocities_k = (Hw_alpha + 1j * c_Hw_Aw_alpha) / HARTREETOEV / BOHRTOANG

Expand Down

0 comments on commit e8b877d

Please sign in to comment.