Hello,
Thanks for reaching out to us on the forum. Let me first write down the important part of the electron self-energy:
$$
\Sigma_{n} = \sum_{m}^{N_{\text{b}}} \frac{\left| g_{mn} \right|^2}{\varepsilon_m - \varepsilon_n}
$$
I left out the \(k\) and \(q\) indices as well as the phonon frequencies for simplicity.
1. Is the number of final-state bands (m) in the electronic self-energy integration determined by ELPH_NBANDS_SUM, and is the default value of ELPH_NBANDS_SUM equal to ELPH_NBANDS?
Essentially, yes. The maximum number of available intermediate bands (\(m\)) in the entire electron-phonon calculation is given by ELPH_NBANDS. You can now choose \(N_{\text{b}}\) that is less than or equal to this number for the computation of the sum over states in the self-energy. This is given via ELPH_NBANDS_SUM, and you can specify more values in a single VASP calculation. This allows you to study how the self-energy converges with respect to \(N_{\text{b}}\). For each value specified, the self-energy is computed and the results are reported in the OUTCAR and Vaspout.h5 output files.
By default, the two tags are the same, meaning you just take all available bands into the sum over states.
2. Are the bands for which the electronic self-energy is calculated (i.e., the initial-state bands, m) controlled by ELPH_SELFEN_BAND_START and ELPH_SELFEN_BAND_STOP?
For clarity, the initial states in the self-energy as written above are labeled by \(n\), and they are different from the intermediate states. They are indeed controlled by ELPH_SELFEN_BAND_START and ELPH_SELFEN_BAND_STOP. The k-point selection for the initial states can be done via ELPH_SELFEN_IKPT or ELPH_SELFEN_KPTS. If you are only interested in the band gap, there is also the convenience tag ELPH_SELFEN_GAPS.
3. If the answers to Questions 1 and 2 are indeed positive, why is the default value of ELPH_NBANDS not max(NELECT/2 + NIONS/2, NELECT*0.6) but instead NELECT? During our tests, we found that for a primitive cell composed of two silicon atoms (with 8 valence electrons), max(NELECT/2 + NIONS/2, NELECT*0.6) equals 5. However, regardless of how ELPH_NBANDS is set, its maximum value and default value are both 8. The relevant calculation files have been uploaded.
You have spotted an ancient mistake on our wiki :-) The formula that we presented was incorrect. I have updated the relevant wiki pages (ELPH_NBANDS and in particular NBANDS) with the correct equation. Thank you very much for bringing this to our attention.