Dear EPW developers,
For epw5.9, in order to obtain mode-resolved mobility, how to modify the code, thank you very much.
Best
Donglin
For epw5.9, how to obtain mode-resolved mobility
Moderator: stiwari
-
- Posts: 23
- Joined: Mon Mar 29, 2021 5:56 am
- Affiliation: CQU
-
- Posts: 23
- Joined: Mon Mar 29, 2021 5:56 am
- Affiliation: CQU
Re: For epw5.9, how to obtain mode-resolved mobility
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
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, :, :,

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, :, :,

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, :, :,

do imode = 1, nmodes
WRITE(1, '(1i8,1E14.5)') imode, 1.0E4 *sum(f_serta3(3, :, :, :, imode)) / part2
enddo
close(1)
ENDIF
- Attachments
-
- transport.zip
- (10.93 KiB) Downloaded 67 times
Re: For epw5.9, how to obtain mode-resolved mobility
Dear Donglin,
There isn't much meaning associated with a mode-resolved mobility since it is not a physical observable. To analyze the effect of different modes on carrier transport, mode resolved scattering rates should be enough.
However, if you still want to obtain that then an easier implementation will be to set electron-phonon coupling to zero for all modes except for the mode of interest. We have a patch that can modify the code to do so.
Let me know if you need that.
Best,
Sabya.
There isn't much meaning associated with a mode-resolved mobility since it is not a physical observable. To analyze the effect of different modes on carrier transport, mode resolved scattering rates should be enough.
However, if you still want to obtain that then an easier implementation will be to set electron-phonon coupling to zero for all modes except for the mode of interest. We have a patch that can modify the code to do so.
Let me know if you need that.
Best,
Sabya.
-
- Posts: 23
- Joined: Mon Mar 29, 2021 5:56 am
- Affiliation: CQU
Re: For epw5.9, how to obtain mode-resolved mobility
yes, i need it. could you give me ,thanks.
Re: For epw5.9, how to obtain mode-resolved mobility
Hi Donglin,
Attached is a patch that should be useful for choosing specific modes for transport. This patch introduces an input parameter "mode_res_tr" using which you can choose which mode you want to eliminate.
E.g., For removing first three modes,
mode_res_tr = 1,2,3
See the attached epw2.in file for inspiration.
Here's what you need to do in order to apply this patch and run calculations.
1. git clone https://gitlab.com/epw/q-e.git
2. cd q-e
3. git checkout sabyadk/q-para
4. git apply patch
5. git status (you will be able to see four changes as shown in the attached screenshot)
6. ./configure --with-scalapack=intel
7. make epw -j <nprocs>
With this you will have the EPW installed with the attached patch.
Best,
Sabya.
Attached is a patch that should be useful for choosing specific modes for transport. This patch introduces an input parameter "mode_res_tr" using which you can choose which mode you want to eliminate.
E.g., For removing first three modes,
mode_res_tr = 1,2,3
See the attached epw2.in file for inspiration.
Here's what you need to do in order to apply this patch and run calculations.
1. git clone https://gitlab.com/epw/q-e.git
2. cd q-e
3. git checkout sabyadk/q-para
4. git apply patch
5. git status (you will be able to see four changes as shown in the attached screenshot)
6. ./configure --with-scalapack=intel
7. make epw -j <nprocs>
With this you will have the EPW installed with the attached patch.
Best,
Sabya.
- Attachments
-
- EPW_patch.zip
- (86.47 KiB) Downloaded 2 times