Skip to content

Conversation

@peio-gg
Copy link

@peio-gg peio-gg commented Jul 12, 2023

Feature implementation of the subroutines to calculate the linear optical response and the nonlinear second-harmonic generation for semiconductors and metals, i.e. taking into account Fermi-surface contributions, as well as the utility to include many-body excitonic effects into the linear and quadratic optical responses within the static long-range approximation

-src/postw90/berry.F90: berry_get_eps_klist. Linear optical response.
-src/postw90/berry.F90: berry_get_shg_klist. Second-harmonic generation.
and depencencies:
-src/postw90/wan_ham.F90: wham_get_deleig_a_b. Second derivatives of the energy eigenvalues with respect to momentum (Author: Álvaro R. Puente-Uriona [https://github.com/irukoa]).
-src/postw90/wan_ham.F90: wham_get_eig_del2eig. Given a k point, this function returns eigenvalues, first derivatives of the eigenvalues using wham_get_deleig_a, and second derivatives of the eigenvalues using wham_get_del2eig_a_b
-src/postw90/wan_ham.F90: wham_get_eig_del2eig_TB_conv. Modified version of wham_get_eig_del2eig for the TB convention avoids recalculating del2HH, delHH and UU, works with input values
-src/utility.F90: utility_get_degen. Compute the degeneracy of a sorted list (Author: Álvaro R. Puente-Uriona [https://github.com/irukoa]).
-utility/mb.py. Python interactive script for including many-body excitonic effects into the linear and quadratic optical responses

peio-gg added 30 commits July 11, 2023 23:15
…se (eps) and nonlinear second-harmonic generation (shg) within the overview of the berry module
…) for the new features: linear optical response and nonlinear second-harmonic generation of the berry module
…ny-body excitonic effects into the linear and quadratic optical responses within the static long-range approximation
…ffects into the linear and quadratic optical responses within the static long-range approximation
…d-order derivatives of eigenvalues as well as the subroutines wham_get_eig_del2eig and wham_get_eig_del2eig_TB_conv for calculating the eigenvalues, first derivatives and second derivatives for a given k-point within the W90 and TB conventions, respectively
…ing them across processors & the subroutine pw90common_get_occ_T for computing temperature-dependent FD electronic occupations
…routines for calculating the linear optical response and the second-harmonic generation processes within the berry module, taking into account Fermi-surface contributions
@Dustglaxy
Copy link

Dear Peio,

I hope this message finds you well. Could you kindly update me on the current status of the SHG function? Specifically, I would like to know if it is operating normally. Additionally, if there are any conflicts preventing it from being merged into the main branch, could you please provide details on the nature and location of these conflicts?

Best regards,
Xiangyang

@peio-gg
Copy link
Author

peio-gg commented Jun 2, 2025

Dear Xiangyang:

SHG is implemented as a subroutine within the berry module, as well as documented with its own tutorial and theoretically explained in the user guide. I would say I did well and it operates correctly. To the best of my knowledge, there are few people that has already used it for their research and no complain has arrived to me. I do not know if I answered your question. Keep in contact.

Best,

Peio.

@Dustglaxy
Copy link

Dear Peio,

Thank you very much for your prompt response. The research is solid, and the program you provided is very useful. I will conduct further tests in my research.

Thank you once again for your valuable contribution.

Best regards,
Xiangyang

@Dustglaxy
Copy link

Dustglaxy commented Nov 2, 2025 via email

@peio-gg
Copy link
Author

peio-gg commented Nov 11, 2025

Dear Xiangyang,

Is your material a metal? In fact, if it is a metal, there are purely metallic or intraband contributions that must be taken into account. As you can see in Eq.22 (a) and (b) of our publication PhysRevB.107.205101. Such terms go as \frac{1}{\omega} for the Berry dipole curvature dipole contribution and \frac{1}{\omega^{2}} for the semiclassical contribution within the conductivity [see Eq.22(b)]. That terms are only taken into account if the temperature is non-zero defined. If zero, they are not calculated. As a default, that parameter is set to 0, so I suspect you did not switched on, did you?

Nevertheless, as you can see, the two- and three-band interband contributions are defined by means of the inverse of energy differences, so if you have degeneracies or conduction/valence bands very close in energy, as \omega\to0 these terms can contribute hugely.

Regarding wannier functions, same drawback. If your material is a metal, it is usually harder to get well localized Wannier functions than in semiconductors/insulators. In this aspect, playing with the inner and outer window, disentanglement parameters, good starting points, etc... is essential.

If you can specify a little bit these things, perhaps I could help you more efficiently. Keep in contact.

Best,
Peio.

@Dustglaxy
Copy link

Dustglaxy commented Nov 11, 2025 via email

@peio-gg
Copy link
Author

peio-gg commented Dec 5, 2025

Dear Xiangyang,

Sorry again for the late answer, I will try to answer quicker next time.

So you have a semimetal with a well-defined energy band gap, is not it? Indeed, when using berry module with postw90.x one must define explicitly the energy of the Fermi level with "fermi_energy" label. Did you set it explicitly? It is the only thing I can think about now. Did you got better Wannier Functions? SHG response function should not be so sensitive to them if they are well localized.

I am sorry I can not access to your files, it is all written in a language I suspect is chinese, but unfortunately I do not know it. Could you guide me on how to get them? Thank you!

Peio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants