Page 1 of 2
SHG error
Posted: Mon Aug 31, 2026 11:11 am
by Sunxl
Dear all,
I used the latest version 2.1 of Lumen to calculate the SHG of the entire process. I calculated the SHG spectrum within the frequency range of 1-2 eV. I found that there was a positive-negative oscillation between adjacent frequency points. However, this issue did not occur when I used Yambo 5.3. Are these two software the same? My output files are attached.

- shg.png (155.86 KiB) Viewed 631 times
Re: SHG error
Posted: Wed Sep 02, 2026 12:16 pm
by claudio
Dear Sunxl
please put your inputs DFT and Lumen in the forum, I will try to reproduce your error
and fix it
best
Claudio
Re: SHG error
Posted: Thu Sep 03, 2026 4:33 am
by Sunxl
Dear claudio,
I have attached the input and output files for DFT. The material I am calculating is an anti-ferromagnetic system. Both Yambo 5.3 and Lumen 2.1 have shown positive and negative oscillation issues, but the ferromagnetic systems I calculated before were normal.
Best,
sunxl
Re: SHG error
Posted: Wed Sep 09, 2026 3:01 pm
by claudio
Dear sunxl
we found a bug, we will fix in the next days and let you know
best
Claudio
Re: SHG error
Posted: Mon Sep 14, 2026 2:16 am
by Sunxl
Dear Claudio,
Thank you very much for your answer.
Under another post, you provided me with a fix version of Lumen, I conducted a calculation of the single-particle spectrum, and it still showed oscillations. Furthermore, for the previous version, I have calculated the calculation for ferromagnetic materials including the soc. Although I'm not sure if the numerical values of the results are correct, it seems that the spectrum is continuously changing. The output file is attached. I wonder if this result is reliable?
If a version applicable to magnetic systems that incorporate SOC computing is released, please let me know. Thank you.
Best,
sunxl
Re: SHG error
Posted: Mon Sep 14, 2026 12:33 pm
by Davide
Dear sunxl,
Sunxl wrote:
found that there was a positive-negative oscillation between adjacent frequency points. However, this issue did not occur when I used Yambo 5.3
Sunxl wrote: Thu Sep 03, 2026 4:33 am
Both Yambo 5.3 and Lumen 2.1 have shown positive and negative oscillation issues, but the ferromagnetic systems I calculated before were normal.
was yambo-5.3 correct, or showing the same issue of lumen 2.1 ?
Best,
D.
Re: SHG error
Posted: Tue Sep 15, 2026 4:24 am
by Sunxl
Dear Davide,
I used two systems, one ferromagnetic system and one antiferromagnetic system. I calculated the SHG using the yambo5.3master and lumen2.1 versions respectively. I found that only the SHG spectrum obtained from the tested ferromagnetic system was continuously changing, which seemed to be a normal result but it was uncertain whether the result was correct. The SHG results obtained from the remaining three cases were oscillatory and jumping between adjacent frequency points. The input and output files of the four results are placed in the attachment. You can use these two systems for testing.
Best,
sunxl
Re: SHG error
Posted: Tue Sep 15, 2026 11:55 am
by Davide
In the folder system1-FM I see two subfolders:
Code: Select all
system1-FM-lumen2.1-wrong system1-FM-yambo5.3master-correct
However, the lumen2.1-wrong contains shg-bse with NaN in the final output, while yambo5.3master-correct contains only shg-ipa
Best,
D.
Re: SHG error
Posted: Wed Sep 16, 2026 5:35 am
by Sunxl
Dear Davide,
The issue does not appear to be specific to the BSE calculation, since it can also be reproduced at the IPA level.
To make the comparison consistent, I performed IPA calculations for both systems using Yambo 5.3-master and Lumen 2.1, respectively, while keeping the calculation setup otherwise the same.
For the FM system, the non-zero SHG component (yxx) gives a normal spectrum with Yambo 5.3-master, whereas the corresponding Lumen 2.1 calculation produces NaN values.
For the AFM system, the non-zero (xxx) component shows the same positive-negative oscillations between adjacent frequency points in both Yambo 5.3-master and Lumen 2.1.
Therefore, the anomalous behavior does not seem to originate simply from the choice between IPA and BSE. It may instead be related to the treatment of magnetic systems with SOC, although the FM and AFM cases may not necessarily have the same origin. I have attached the corresponding IPA test results for both systems.
Best,
sunxl
Re: SHG error
Posted: Wed Sep 16, 2026 7:52 am
by Davide
Thanks. Just one last check. Do you get NaN also with the bug-fixes of Lumen ?
In case we will add this to the list of open issues, and reply here as soon as we are able to reproduce the issue and eventually fix it.
Best,
D.
P.S.: One more thing. Please add a signature in the settings of your user in the forum.