Dear developers,
I am reading the paper "Secondharmonic generation in singlelayer monochalcogenides: A response from firstprinciples realtime simulations" (PHYSICAL REVIEW MATERIALS 3, 074003 (2019)). I am very interested in the calculations of SHG of 2D materials and wnat to learn it.
So, I did some calculations of InSe monolayer, but something goes worng. Can you give me some help?
Here is my yambo_nl input file:
FFTGvecs= 21125 RL # [FFT] Planewaves
% NLBands
16 23  # [NL] Bands
%
NLstep= 0.02 fs # [NL] Real Time step length
NLtime=75.000000 fs # [NL] Simulation Time
NLintegrator= "INVINT" # [NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")
NLCorrelation= "IPA" # [NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX")
NLLrcAlpha= 0.000000 # [NL] Long Range Correction
% NLEnRange
0.300000  5.000000  eV # [NL] Energy range
%
NLEnSteps= 80 # [NL] Energy steps
NLDamping= 0.100000 eV # [NL] Damping
% ExtF_Dir
1.000000  0.000000  0.000000  # [NL ExtF] Versor
%
ExtF_FrStep= 0.000000 eV # [NL ExtF] Frequency step
ExtF_Int= 500. kWLm2 # [NL ExtF] Intensity
ExtF_Damp= 2.000000 fs # [NL ExtF] FWHM
ExtF_kind= "SOFTSIN" # [NL ExtF] Kind(SINSOFTSINRESANTIRESGAUSSDELTAQSSIN)
ExtF_Tstart= 0.0100 fs # [NL ExtF] Initial Time
GfnQPdb= "none" # [EXTQP G] Database
GfnQP_N= 1 # [EXTQP G] Interpolation neighbours
% GfnQP_E
1.330000  1.000000  1.000000  # [EXTQP G] E parameters (c/v) eVadimadim
%
And ypp_nl input file:
nonlinear # [R] NonLinear Optics PostProcessing
Xorder=4 # Max order of the response functions
% TimeRange
34.00  75.00  fs # Timewindow where processing is done
%
ETStpsRt=200 # Total Energy steps
% EnRngeRt
0.30  5.00  eV # Energy range
%
DampMode= "NONE" # Damping type ( NONE  LORENTZIAN  GAUSSIAN )
DampFactor= 0.100000 eV # Damping parameter
My question is : 1. Are the input files right?
2. How to deal with the output file "o2D.YPPX_probe_order_2" in order to get the SHG coefficients of InSe?
Thanks in advance.
questions about SHG of InSe
Moderators: Davide Sangalli, andrea marini, Daniele Varsano, andrea.ferretti, Conor Hogan, myrta gruning

 Posts: 16
 Joined: Thu Oct 10, 2019 7:03 am
questions about SHG of InSe
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.
 claudio
 Posts: 228
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: questions about SHG of InSe
Dear Dr. Yimin Ding
your input files seem correct to me. I will only change the NLstep= 0.01 fs
what problem did he have?
Regarding the file o2D.YPPX_probe_order_2 it contains the X2 coefficients. The X^2_{xxy},
because you put the incoming field in x and measure the nonlinear response in y.
In particular, the ones plotted in the paper are the 5 and 6 columns.
Remember that you have to rescale them:
1) fist from m/V to the CGS system, divide for 2.38721e09
2) you have to rescale for the box size respect to the width of the material, for example,
if you have simulation box 35 a.u. high and your material width is 15.042219756 a.u.
you rescale for 35.0/15.042219756
let me know if it is clear
best
Claudio
your input files seem correct to me. I will only change the NLstep= 0.01 fs
what problem did he have?
Regarding the file o2D.YPPX_probe_order_2 it contains the X2 coefficients. The X^2_{xxy},
because you put the incoming field in x and measure the nonlinear response in y.
In particular, the ones plotted in the paper are the 5 and 6 columns.
Remember that you have to rescale them:
1) fist from m/V to the CGS system, divide for 2.38721e09
2) you have to rescale for the box size respect to the width of the material, for example,
if you have simulation box 35 a.u. high and your material width is 15.042219756 a.u.
you rescale for 35.0/15.042219756
let me know if it is clear
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
Freely download scientific books from: http://www.freescience.info
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
Freely download scientific books from: http://www.freescience.info

 Posts: 16
 Joined: Thu Oct 10, 2019 7:03 am
Re: questions about SHG of InSe
Dear Dr. Claudio,
Thanks for your reply.
My plot of X2 coefficients shows that the peak shifts to higher energy range. See the attachments please.
Look forward to your reply.
Thanks for your reply.
My plot of X2 coefficients shows that the peak shifts to higher energy range. See the attachments please.
Look forward to your reply.
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: 228
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: questions about SHG of InSe
Dear Dr. Yimin Ding
I agree with you, but in your input, you introduced a shift of 1.33 eV
% GfnQP_E
1.330000  1.000000  1.000000  # [EXTQP G] E parameters (c/v) eVadimadim
%
while in the IPA plot of my paper this is not present.
Try to use 0 shift and a mearing of 0.2 eV, you will get the same plot in IPA.
let me know
Claudio
I agree with you, but in your input, you introduced a shift of 1.33 eV
% GfnQP_E
1.330000  1.000000  1.000000  # [EXTQP G] E parameters (c/v) eVadimadim
%
while in the IPA plot of my paper this is not present.
Try to use 0 shift and a mearing of 0.2 eV, you will get the same plot in IPA.
let me know
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
Freely download scientific books from: http://www.freescience.info
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
Freely download scientific books from: http://www.freescience.info

 Posts: 16
 Joined: Thu Oct 10, 2019 7:03 am
Re: questions about SHG of InSe
Dear Dr. Claudio,
Thanks for your reply.
I still have the following questions:
1.Why the Xorder in ypp.in is set as 4 not 2?
2.The smearing you said is "NLDamping= 0.100000 eV" in yambo.in or "DampFactor= 0.100000 eV" in ypp.in?
3. I initially want to repeat the results of G0W0+BSE. How to do that?
4. The Tutorials of nonlinear calculations will be put on the new official website of yambo or wiki website?
Look forward to your reply.
Thanks for your reply.
I still have the following questions:
1.Why the Xorder in ypp.in is set as 4 not 2?
2.The smearing you said is "NLDamping= 0.100000 eV" in yambo.in or "DampFactor= 0.100000 eV" in ypp.in?
3. I initially want to repeat the results of G0W0+BSE. How to do that?
4. The Tutorials of nonlinear calculations will be put on the new official website of yambo or wiki website?
Look forward to your reply.
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.
 claudio
 Posts: 228
 Joined: Tue Mar 31, 2009 11:33 pm
 Contact:
Re: questions about SHG of InSe
Dear Dr. Yimin Ding
here the reply to your questions:
>1.Why the Xorder in ypp.in is set as 4 not 2?
the nonlinear response is extract by fitting the time dependent polarization, we think it is better to use more coefficient
for the fit up to 4 I will say. See Eq. 26, 27 and 28 of https://arxiv.org/pdf/1309.4012.pdf.
You can test if putting only 2 gives you the same result.
>2.The smearing you said is "NLDamping= 0.100000 eV" in yambo.in or "DampFactor= 0.100000 eV" in ypp.in?
The DampFactor in ypp.in is valid only in linear optics, and actived if you select a DampMode different from "NONE"
I will add a comment in the tutorial on this point.
>3. I initially want to repeat the results of G0W0+BSE. How to do that?
Follow the step of the turorial on BSE
http://www.attaccalite.com/lumen/real_time_bse.html
and calculate the nonlinear response.
>4. The Tutorials of nonlinear calculations will be put on the new official website of yambo or wiki website?
yes, soon.
best regards
Claudio Attaccalite
here the reply to your questions:
>1.Why the Xorder in ypp.in is set as 4 not 2?
the nonlinear response is extract by fitting the time dependent polarization, we think it is better to use more coefficient
for the fit up to 4 I will say. See Eq. 26, 27 and 28 of https://arxiv.org/pdf/1309.4012.pdf.
You can test if putting only 2 gives you the same result.
>2.The smearing you said is "NLDamping= 0.100000 eV" in yambo.in or "DampFactor= 0.100000 eV" in ypp.in?
The DampFactor in ypp.in is valid only in linear optics, and actived if you select a DampMode different from "NONE"
I will add a comment in the tutorial on this point.
>3. I initially want to repeat the results of G0W0+BSE. How to do that?
Follow the step of the turorial on BSE
http://www.attaccalite.com/lumen/real_time_bse.html
and calculate the nonlinear response.
>4. The Tutorials of nonlinear calculations will be put on the new official website of yambo or wiki website?
yes, soon.
best regards
Claudio Attaccalite
Claudio Attaccalite
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
Freely download scientific books from: http://www.freescience.info
[CNRS/ AixMarseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com
Freely download scientific books from: http://www.freescience.info

 Posts: 16
 Joined: Thu Oct 10, 2019 7:03 am
Re: questions about SHG of InSe
Dear Dr. Claudio,
Thanks very much.
Thanks very much.
Dr. Yimin Ding
Soochow University, China.
Soochow University, China.