Wrong SHG component in nl calculations
Moderators: Davide Sangalli, claudio, myrta gruning

 Posts: 98
 Joined: Thu Oct 10, 2019 7:03 am
Wrong SHG component in nl calculations
Dear all,
I want to calculate the SHG coefficient of 2D material with C2v point group.
According to some references, one of nonzero SHG coefficient of this 2D materials is Xxxy.
But, my results show that the Xyyy is nonzero?
Any help is appreciated.
The input /output of QE and yambo are attached.
Best wishes,
I want to calculate the SHG coefficient of 2D material with C2v point group.
According to some references, one of nonzero SHG coefficient of this 2D materials is Xxxy.
But, my results show that the Xyyy is nonzero?
Any help is appreciated.
The input /output of QE and yambo are attached.
Best wishes,
You do not have the required permissions to view the files attached to this post.
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.
 claudio
 Posts: 438
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: Wrong SHG component in nl calculations
Dear Dean
it seems that your result is just noise,
I don't know why, please try:
1) download the last version of the code
https://www.yambocode.eu/2023/09/08/yamborelease52/
2) decrease the timestep to 0.01 fs
3) increase the dephasing time miltiplayer in src/modules/mod_nl_optics.F
integer, parameter :: DephMult=6
and recompile ypp_nl and yambo_nl
than use NLtime=1 in input
4) try to make a test on a simpler system for example hBN monolayer, and see if it works
here DFT inputs
https://www.yambocode.eu/wiki/index.ph ... BSE_level
let us know
best
Claudio
it seems that your result is just noise,
I don't know why, please try:
1) download the last version of the code
https://www.yambocode.eu/2023/09/08/yamborelease52/
2) decrease the timestep to 0.01 fs
3) increase the dephasing time miltiplayer in src/modules/mod_nl_optics.F
integer, parameter :: DephMult=6
and recompile ypp_nl and yambo_nl
than use NLtime=1 in input
4) try to make a test on a simpler system for example hBN monolayer, and see if it works
here DFT inputs
https://www.yambocode.eu/wiki/index.ph ... BSE_level
let us know
best
Claudio
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

 Posts: 98
 Joined: Thu Oct 10, 2019 7:03 am
Re: Wrong SHG component in nl calculations
Dear Claudio,
Thanks for your reply.
1. I use the lastest version of the code (Yambo5.2.0), but the output files show "Version 5.1.0 Revision 22561 Hash (prev commit) 785b4fd6f".
2. Based on your suggestion, I recombile yambo with DephMult=6. Then, set timestep to 0.01 fs and NLtime=1 in the input, but the output is as same as previous run.(please the attachment)
3.I have make a test for hBN, and it works.
4.For my 2D system with C2v point group，it should have five nonzero SHG components, i.e., yxx,yyy, yzz, xxy,zyz. I can get SHG components including yxx,yyy,yzz, and yxy,yyz. But, according to some references, yxy and yyz should be zero, and xxy and zyz should be nonzero, which makes me confused.
Best,
Thanks for your reply.
1. I use the lastest version of the code (Yambo5.2.0), but the output files show "Version 5.1.0 Revision 22561 Hash (prev commit) 785b4fd6f".
2. Based on your suggestion, I recombile yambo with DephMult=6. Then, set timestep to 0.01 fs and NLtime=1 in the input, but the output is as same as previous run.(please the attachment)
3.I have make a test for hBN, and it works.
4.For my 2D system with C2v point group，it should have five nonzero SHG components, i.e., yxx,yyy, yzz, xxy,zyz. I can get SHG components including yxx,yyy,yzz, and yxy,yyz. But, according to some references, yxy and yyz should be zero, and xxy and zyz should be nonzero, which makes me confused.
Best,
You do not have the required permissions to view the files attached to this post.
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.
 claudio
 Posts: 438
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: Wrong SHG component in nl calculations
Dear Yimin
I will try to reproduce your results and let you know
best
Claudio
I will try to reproduce your results and let you know
best
Claudio
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

 Posts: 98
 Joined: Thu Oct 10, 2019 7:03 am
Re: Wrong SHG component in nl calculations
Dear Claudio,
Is there any progress in reproducing my results?
I have another question. The NL calculations can be speed up on GPUs, especially the timeconsuming COLLISIONS calculations?
Best,
Is there any progress in reproducing my results?
I have another question. The NL calculations can be speed up on GPUs, especially the timeconsuming COLLISIONS calculations?
Best,
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.
 claudio
 Posts: 438
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: Wrong SHG component in nl calculations
Dear Yimin
I reproduced your results, and it is clear that there is a bug with this system, I will try to solve it this week
and come back to you
for the COLLISIONS... I will ask to the other developers I did not optimized that part
best
Claudio
I reproduced your results, and it is clear that there is a bug with this system, I will try to solve it this week
and come back to you
for the COLLISIONS... I will ask to the other developers I did not optimized that part
best
Claudio
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
 claudio
 Posts: 438
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: Wrong SHG component in nl calculations
Dear Yimin
are you sure of the atomic positions in your input? from QE the system does not have many symmetries.
I slightly modified atomic positions to be more symmetric, but I think you should have the correct symmetries
already at the QE level.
I will make you know for the rest
best
Claudio
are you sure of the atomic positions in your input? from QE the system does not have many symmetries.
I slightly modified atomic positions to be more symmetric, but I think you should have the correct symmetries
already at the QE level.
I will make you know for the rest
best
Claudio
You do not have the required permissions to view the files attached to this post.
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
 claudio
 Posts: 438
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: Wrong SHG component in nl calculations
Dear Yimin
you can get the correct structure here:
https://backend.orbit.dtu.dk/ws/files/3 ... _Kruse.pdf
https://cmrdb.fysik.dtu.dk/c2db/row/Nb2 ... 127da2c220
I also noticed that this material is ferroelectric, I don't know if this can be the problem....
I will see
best
Claudio
you can get the correct structure here:
https://backend.orbit.dtu.dk/ws/files/3 ... _Kruse.pdf
https://cmrdb.fysik.dtu.dk/c2db/row/Nb2 ... 127da2c220
I also noticed that this material is ferroelectric, I don't know if this can be the problem....
I will see
best
Claudio
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

 Posts: 98
 Joined: Thu Oct 10, 2019 7:03 am
Re: Wrong SHG component in nl calculations
Dear Claudio，
Thanks for your reply.
Actually, this material is ferroelectric and shows C2v point group. That is why it does not show many symmetries. Your modified structure is not ferroelectric, which is not the most stable state for this kind of materials.
So, may ferroelectric preperty result in the problem?
Bset,
Thanks for your reply.
Actually, this material is ferroelectric and shows C2v point group. That is why it does not show many symmetries. Your modified structure is not ferroelectric, which is not the most stable state for this kind of materials.
So, may ferroelectric preperty result in the problem?
Bset,
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.