3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 20:34:38 +01:00

refactor: simplify code in computing velocities

This commit is contained in:
phibeck 2023-03-20 11:10:40 -04:00 committed by Alexander Hampel
parent d4ef98edfd
commit 468cf6efc7

View File

@ -319,7 +319,7 @@ def recompute_w90_input_on_different_mesh(sum_k, seedname, nk_optics, pathname='
elif oc_basis == 'w':
# first term
Hw_alpha_R = dataK.Ham_R.copy()
for i in range(1):
# following three lines copied from wannierberri/data_K.py
shape_cR = numpy.shape(dataK.cRvec_wcc)
Hw_alpha_R = 1j * Hw_alpha_R.reshape((Hw_alpha_R.shape) + (1, )) * dataK.cRvec_wcc.reshape(
(shape_cR[0], shape_cR[1], dataK.system.nRvec) + (1, ) * len(Hw_alpha_R.shape[3:]) + (3, ))