Page 1 of 1

electron self-energy calculation

Posted: Fri Jan 15, 2021 7:31 am
by Qiaolin
Dear EPW developers:

I have managed to use 'iverbosity=3' to get the detailed information about electron self-energy, but when i correte the code to get much further detailed information, i find it is not inconsistent. For example:

src/selfen.f90, line 338: [u]sigmai_mode(ibnd, imode, ik + lower_bnd - 1, itemp) = sigmai_mode(ibnd, imode, ik + lower_bnd - 1, itemp) + g2 * weight[/u]

I add a line "sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) = g2 * weight " to get self-energy of ibnd-to-jbnd under the effect of different scattering mode.

Theoretically, the sum of sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) about jbnd should be equal to sigmai_mode(ibnd, imode, ik + lower_bnd - 1, itemp). But i find that if i just use "nqf1 = 1; nqf2 = 1; nqf3 =1", my results satisfy the above condition; if i use more q points, my results do not satisfy the above condition and sigmai_mode_detail is always 0.

I have no idea about this phenomenon, and I guess whether it originates from the function mp_sum(sigmai_mode_detail, inter_pool_comm).

My corrected code:https://github.com/Isabellelin/g_matric ... n/epw_code

Best,

Qiaolin

Re: electron self-energy calculation

Posted: Fri Jan 15, 2021 10:20 pm
by hlee
Dear Qiaolin:

(From selfen.f90)

Code: Select all

    IF (iqq == totq) THEN
      !
      ALLOCATE(xkf_all(3, nkqtotf), STAT = ierr)
      IF (ierr /= 0) CALL errore('selfen_elec_q', 'Error allocating xkf_all', 1)
      ALLOCATE(etf_all(nbndsub, nkqtotf), STAT = ierr)
      IF (ierr /= 0) CALL errore('selfen_elec_q', 'Error allocating etf_all', 1)
      xkf_all(:, :) = zero
      etf_all(:, :) = zero
      !
#if defined(__MPI)
      !
      ! note that poolgather2 works with the doubled grid (k and k+q)
      !
      CALL poolgather2(3, nkqtotf, nkqf, xkf, xkf_all)
      CALL poolgather2(nbndsub, nkqtotf, nkqf, etf, etf_all)
      CALL mp_sum(sigmar_all, inter_pool_comm)
      CALL mp_sum(sigmai_all, inter_pool_comm)
      IF (iverbosity == 3) CALL mp_sum(sigmai_mode, inter_pool_comm) ! sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) 
      IF (iverbosity == 3) CALL mp_sum(sigmai_mode_detail, inter_pool_comm)
      CALL mp_sum(zi_all, inter_pool_comm)
      CALL mp_sum(fermicount, inter_pool_comm)
      CALL mp_barrier(inter_pool_comm)
      !
#else
I don't know clearly what you want to calculate, but now you are calculating the band (jbnd)-resolved electron self-energy at the last q point (NOT summed over all q); see Eq. (3) of the EPW technical paper (https://www.sciencedirect.com/science/a ... via%3Dihub) and check the statement of "IF (iqq == totq) THEN" in the above code section.

The array of sigmai_mode doesn't have the argument of q, but implicitly it is summed over all q and the total of summed value (over q) is printed at the last iteration of q.
Therefore, if you want the summation of electron self-energy over q, you might need the following one:

Code: Select all

sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) = sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) + g2 * weight
rather than

Code: Select all

sigmai_mode_detail(ibnd, jbnd,imode, ik + lower_bnd - 1, itemp) = g2 * weight
.

Sincerely,

H. Lee

Re: electron self-energy calculation

Posted: Sun Jan 17, 2021 10:06 am
by Qiaolin
Dear H. Lee:

Thank you very much! With your help, I have got the band-resolved and mode-resolved electron self-energy

Sincerely,

QiaoLin