Page 1 of 1

For epw5.9, how to obtain mode-resolved mobility

Posted: Wed Jun 25, 2025 2:20 am
by guodonglin
Dear EPW developers,

For epw5.9, in order to obtain mode-resolved mobility, how to modify the code, thank you very much.

Best
Donglin

Re: For epw5.9, how to obtain mode-resolved mobility

Posted: Sun Jun 29, 2025 1:58 pm
by guodonglin
Dear EPW developers,

I have modified the transport.f90 file to calculate both the overall RTA mobility and the mode-resolved mobility. Although the code compiles successfully and outputs data, the results differ from those in epw.out, indicating an issue with my modifications. Could the EPW team kindly review the changes and help identify the problem so that I can improve the code? For reference, I have attached the modified files and the added sections.

Thank you.

IF (iverbosity == 3) THEN

DO itemp = 1, nstemp
etemp = gtemp(itemp)
DO ik = 1, nktotf
DO ibnd = 1, nbndfst
IF (ABS(inv_tau_allcb(ibnd, ik, itemp)) > eps160 ) THEN
ekk = etf_all(ibnd, ik) - ef0(itemp)
fnk = wgauss(-ekk / etemp, -99)
dfnk = w0gauss(ekk / etemp, -99) / etemp
part2 = part2 + fnk
! (-) sign is because w0gauss is - df/de
f_serta(:, ibnd, ik, itemp) = wkf_all(ik) * dfnk * vkk_all(:, ibnd, ik) * vkk_all(:, ibnd, ik) * 1.093846036396395d0 * 1.093846036396395d0 / (inv_tau_allcb(ibnd, ik, itemp) * ryd2mev * mev2invps)

DO imode = 1, nmodes
IF (ABS(inv_tau_allcb_mode(imode, ibnd, ik, itemp)) > eps160) THEN
f_serta3(:, ibnd, ik, itemp, imode) = wkf_all(ik) * dfnk * vkk_all(:, ibnd, ik) * vkk_all(:, ibnd, ik) * 1.093846036396395d0 * 1.093846036396395d0 / (inv_tau_allcb_mode(imode, ibnd, ik, itemp) * ryd2mev * mev2invps)
ENDIF
ENDDO

ENDIF


ENDDO
ENDDO
ENDDO


OPEN (1, file="BTE.mode_xx", status="replace")
WRITE(1, '(1E14.5)') 1.0E4 *sum (f_serta(1, :, :, :))/part2
do imode = 1, nmodes

WRITE(1, '(1i8,1E14.5)') imode, 1.0E4 *sum(f_serta3(1, :, :, :, imode)) / part2
enddo
close(1)


OPEN (1, file="BTE.mode_yy", status="replace")
WRITE(1, '(1E14.5)') 1.0E4 *sum (f_serta(2, :, :, :))/part2
do imode = 1, nmodes

WRITE(1, '(1i8,1E14.5)') imode, 1.0E4 *sum(f_serta3(2, :, :, :, imode)) / part2
enddo
close(1)


OPEN (1, file="BTE.mode_zz", status="replace")
WRITE(1, '(1E14.5)') 1.0E4 *sum (f_serta(3, :, :, :))/part2
do imode = 1, nmodes

WRITE(1, '(1i8,1E14.5)') imode, 1.0E4 *sum(f_serta3(3, :, :, :, imode)) / part2
enddo
close(1)



ENDIF