In the comments of the subroutine you mentioned, that expression is for the case that the delta approximation is not used and in that expression, the part including the electron-phonon (e-ph) vertex is just omitted [Please pay your attention to the "sans"]; the e-ph vertex is correctly included in the actual calculation in EPW.I note that another thing different from epw and qe:
The prints from EPW/src/ephwann_shuffle.f90 doesn't mention the square of the electron-phonon matrix, and in EPW/src/selfen.f90:
Since you are using the delta approximation (you set delta_approx= .true. in your EPW input) [See J. Noffsinger et al, Comput. Phys. Comm. 181, 2140 (2010)], the expressions used in the subroutine of selfen_phon_q in EPW/src and that of elphsum in PHonon/PH are the same. Both of them consider the spin degeneracy.
As I said, the only difference is that in EPW, the thing printed has an additional factor of 2 [The printing of phonon linewidth is done in EPW/src/ephwann_shuffle.f90] according to the expression of \Gamma = - 2 * Im \Pi^R .
This is related to the different thing.And I compare curves between phonon dispersion and linewidth, the epw linewidth equal to zero points is exactly the imaginary phonon dispersion points. I think this is the reason for difference and it may affect other electron-phonon coupling calculations (electron-phonon matrix? electron-phonon constant?).
In EPW, when the phonon frequency is less than eps_acustic (See https://docs.epw-code.org/doc/Inputs.html#eps-acustic), some properties are ignored (set to zero). In your case, this leads to the zero phonon linewidth for the q values where the phonon frequency is less than eps_acustic.
(Excerpt from the subroutine of selfen_phon_q in EPW/src/selfen.f90)
Code: Select all
wq(:) = zero
DO imode = 1, nmodes
wq(imode) = wf(imode, iq)
IF (wq(imode) > eps_acustic) THEN
g2_tmp(imode) = one
inv_wq(imode) = one / (two * wq(imode))
ELSE
g2_tmp(imode) = zero
inv_wq(imode) = zero
ENDIF
ENDDO
H. Lee