修改EPW输出复数形式的$g_{mnv}(k,q)$

Posted by Xiehua on August 28, 2022

修改printing.f90中的subroutine print_gkk,输出复数形式的$g^{SE}_{mn\nu}(\textbf{k},\textbf{q})$

要求: 不需要根据简并特点求平均,为了得到能量量纲的电声耦合大小,输出的值为:$\sqrt{\frac{\hbar}{2m_0\omega_{qv}}}g_{mnv}(\textbf{k},\textbf{q})$

\[g_{mn\nu}(\textbf{k},\textbf{q})=\langle{m\textbf{k+q}}|\partial_{\textbf{q}\nu}V|n\textbf{k}\rangle\] \[g^{SE}_{mn\nu}(\textbf{k},\textbf{q})=\sqrt{\frac{\hbar}{2m_0\omega_{q\nu}}}g_{mn\nu}(\textbf{k},\textbf{q})\]

其中$m_0$为一个任意的参考质量,只是为了方便数据处理,$m_0$一般选择为质子质量,用于消除文献:Electron-phonon interaction using Wannier functions中公式(12)、(13)、(15)、(17)中计算$\partial_{\textbf{q}\nu}V$时引入的$m_0$。

其中

$g^{SE}_{mn\nu}(\textbf{k},\textbf{q})$

具有能量量纲,

$g_{mn\nu}(\textbf{k},\textbf{q})$

具有能量除以长度量纲。

reference:Electron-phonon interaction using Wannier functions

在实际的EPW程序中,epf17的量纲是$\frac{E}{\sqrt{M}l}$,输出 \(g^{SE}_{mn\nu}(\textbf{k},\textbf{q})\) 时只需要乘以 \(\sqrt{\frac{\hbar}{2\omega_{qv}}}\)

1
2
3
            gamma = (ABS(epf17(jbnd, ibnd, nu, ik)))**two
            IF (wq > 0.d0) THEN
              gamma = gamma / (two * wq)

printing.f90做如下修改:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    USE constants_epw, ONLY : ryd2mev, ryd2ev, two, zero, czero    ! Line 32

    complex(kind=dp),allocatable :: epc_cmp(:,:,:,:)   ! Line 92
    !! complex gmnvkq-vertex with out "SYMMETRIZE"
    !! "SYMMETRIZE": actually we simply take the averages over
    !! degenerate states, it is only a convention because g is gauge-dependent!    

    allocate(epc_cmp(nbndfst,nbndfst,nmodes,nktotf),STAT = ierr)  ! Line 104
    IF (ierr /= 0) CALL errore('print_gkk', 'Error allocating epc_cmp', 1)

    epc_cmp(:,:,:,:) = czero ! Line 109

    ! First do the average over bands and modes for each pool
    DO ik = 1, nkf
      ikk = 2 * ik - 1
      ikq = ikk + 1
      !
      DO nu = 1, nmodes
        wq = wf(nu, iq)
        DO ibnd = 1, nbndfst
          DO jbnd = 1, nbndfst
            gamma = (ABS(epf17(jbnd, ibnd, nu, ik)))**two
            IF (wq > 0.d0) THEN
              gamma = gamma / (two * wq)
              epc_cmp(ibnd, jbnd, nu, ik + lower_bnd - 1) = epf17(jbnd, ibnd, nu, ik)/sqrt(two * wq)
            ELSE
              gamma = 0.d0
              epc_cmp(ibnd, jbnd, nu, ik + lower_bnd - 1) = czero
            ENDIF
            gamma = DSQRT(gamma)
            ! gamma = |g| [Ry]
            epc(ibnd, jbnd, nu, ik + lower_bnd - 1) = gamma
          ENDDO ! jbnd
        ENDDO   ! ibnd
      ENDDO ! loop on modes
      !


      CALL mp_sum(epc_cmp, inter_pool_comm )  !Line 214

    ! Only master writes
    IF (mpime == ionode_id) THEN
      !
      WRITE(stdout, '(5x, a)') ' Electron-phonon vertex |g| (meV)'
      !
      WRITE(stdout, '(/5x, "iq = ", i7, " coord.: ", 3f12.7)') iq, xqf(:, iq)
      DO ik = 1, nktotf
        !
        ikk = 2 * ik - 1
        ikq = ikk + 1
        !
        WRITE(stdout, '(5x, "ik = ", i7, " coord.: ", 3f12.7)') ik, xkf_all(:, ikk)
        WRITE(stdout, '(5x, a)') ' ibnd     jbnd     imode   enk[eV]    enk+q[eV]  &
        &  omega(q)[meV]      |g|[meV]      Re[gmnvkq][meV]     Im[gmnvkq][meV]'
        WRITE(stdout, '(5x, a)') REPEAT('-', 118)
        !
        DO ibnd = 1, nbndfst
          ekk = etf_all(ibndmin - 1 + ibnd, ikk)
          DO jbnd = 1, nbndfst
            ekq = etf_all(ibndmin - 1 + jbnd, ikq)
            DO nu = 1, nmodes
              WRITE(stdout, '(3i9, 2f12.6, 1f20.10, 3e20.10)') ibndmin - 1 + ibnd, ibndmin - 1 + jbnd, &
                   nu, ryd2ev * ekk, ryd2ev * ekq, ryd2mev * wf(nu, iq), ryd2mev * epc(ibnd, jbnd, nu, ik), &
                   ryd2mev*epc_cmp(ibnd, jbnd, nu, ik)
            ENDDO
          ENDDO
          !
        ENDDO
        WRITE(stdout, '(5x, a/)') REPEAT('-', 118)
        !
      ENDDO
    ENDIF ! master node
    !
    DEALLOCATE(epc, STAT = ierr)
    IF (ierr /= 0) CALL errore('print_gkk', 'Error deallocating epc', 1)
    DEALLOCATE(epc_sym, STAT = ierr)
    IF (ierr /= 0) CALL errore('print_gkk', 'Error deallocating epc_sym', 1)
    deallocate(epc_cmp,stat = ierr)
    IF (ierr /= 0) CALL errore('print_gkk', 'Error deallocating epc_sym', 1)
    !

修改后代码以及软件编译参考:QUANTUM ESPRESSO v7.1 修改版安装

Note: 如有建议或者遇到问题,欢迎在评论区留言。评论系统采用了Disqus系统,需要翻墙才能加载。