Difference between revisions of "Real time approach to non-linear response"

From The Yambo Project
Jump to: navigation, search
(Prerequisites)
m
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Background ==
 
Non-linear response calculation is similar to the linear response case, with the only difference that we excite the system with a sinusoidal external field and use the scheme described in Ref. <ref>C. Attaccalite and M. Gruning, [https://arxiv.org/abs/1309.4012v2 Rev. B, 88, 235113 (2013)]</ref> and show below to extract the non-linear coefficients:
 
 
[[File:Scheme nl.png|350px|center|Schematic representation of real-time calculations]]
 
== Prerequisites ==
 
You need <code>yambo_nl</code> and <code> ypp_nl</code> compiled in double precision for this tutorial. The DFT inputs and yambo databases can be found here: [http://www.yambo-code.org/educational/tutorials/files/AlAs.tar.gz AlAs.tar.gz].
 
  
 
== Second Harmonic Generation in AlAs ==
 
== Second Harmonic Generation in AlAs ==
Line 24: Line 18:
  
 
  p2y -F data-file-schema.xml                               
 
  p2y -F data-file-schema.xml                               
Now you proceed in the same wave of the previous tutorial[[Real time approach to linear response (TDSE)]]  (from point 2 to 6) considering an external field in the <code>[1,1,0]</code> direction.
+
Now you proceed in the same wave of the previous tutorial [[Real time approach to linear response (TDSE)]]  (from point 2 to 6) considering an external field in the <code>[1,1,0]</code> direction.
  
 
==Real-time simulation for the SHG==
 
==Real-time simulation for the SHG==

Revision as of 15:15, 16 January 2020

Second Harmonic Generation in AlAs

In this tutorial, we will calculate the second harmonic generation of bulk AlAs. The first six step of this tutorials are the same of the one on linear-response with the only difference that we will work on AlAs and we will use Abinit to generate the Kohn-Sham wave-functions. The DFT input are available here: ABINIT or QuantumEspresso. You can run the DFT calculation with ABINIT with the command:

abinit < AlAs.in > output_AlAs                                             

or using QuantumEspresso:

pw.x -inp AlAs.scf.in > output_scf
pw.x -inp AlAs.nscf.in > output_scf                            

and then import the ABINIT wave-function with the command:

a2y -F alas-o_DS2_KSS                            

and the QuantumEspresso one, in the folder AlAs.save with the command:

p2y -F data-file-schema.xml                              

Now you proceed in the same wave of the previous tutorial Real time approach to linear response (TDSE) (from point 2 to 6) considering an external field in the [1,1,0] direction.

Real-time simulation for the SHG

You can generate the input file with the command yambo_nl -u:

nlinear                      # [R NL] Non-linear optics
% NLBands
  3 | 6 |                   # [NL] Bands
%
NLstep=   0.0100       fs    # [NL] Real Time step length
NLintegrator= "INVINT"       # [NL] Integrator ("EULEREXP/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")
NLCorrelation= "IPA"         # [NL] Correlation ("IPA/HARTREE/TDDFT/LRC/JGM/SEX/HF")
NLLrcAlpha= 0.000000         # [NL] Long Range Correction
% NLEnRange
   1.000000 | 5.000000 | eV    # [NL] Energy range
%
NLEnSteps=  10                # [NL] Energy steps
NLDamping=  0.150000    eV    # [NL] Damping
% ExtF_Dir
  1.000000 | 1.000000 | 0.000000 |        # [NL ExtF] Versor
ExtF_kind= "SOFTSIN"         # [NL ExtF] Kind(SIN|SOFTSIN|RES|ANTIRES|GAUSS|DELTA|QSSIN)

The line |1.000000 | 1.000000 | 0.000000 | # [NL ExtF] Versor referees to the direction of the external field (x,y,0). At present only an external field is present but the code can be easily generalized to deal with more fields. The default parameters of Yambo/Lumen are already tuned for second-harmonic generation, so the only thing you have to change is the band range, between 3 and 6 and the energy range between 1.0-5.0 eV and the number of energy steps in this interval that we set to 10. Notice that you cannot set to zero the lowest value of the energy range because this will requires a simulation that lasts infinite time, see below. Finally, consider that Yambo performs a separate calculation for each frequency, so if you set many energy steps the computational time grows linearly with this number. Run yambo_nl. Calculations will take about fifteen minutes on a single processor PC, you have time to study the next section that explains how non-linear response is extracted from the real-time simulations. In order to speed up calculations, you can run them in parallel.

Non-linear response with Yambo

In order to calculate the non-linear response, the system is excited with different laser fields with a sinusoidal shape at frequencies [math]\omega_1, \omega_2, .... , \omega_n [/math] determined by the parameters NLEnRange and NLEnSteps. A dephasing term is added to the Hamiltonian [math]\gamma = [/math]NLDamping to simulate a finite broadening and to remove the eigenmodes that are excited by the sudden turning on of the external field. After the dephasing time the outgoing signal is analyzed to extract the non-linear coefficients as shown in the figure below:

Non-linear response analysis


In the report file r_nlinear you will find the length of the dephasing part and of the sampling one:

 Dephasing Time          [fs]: 43.880793 
 Sampling  Time          [fs]:  4.185667
 Total simulation time   [fs]: 48.066460                       

The length of the dephasing interval is inversely proportional to the damping term [math]T_{depth} \simeq 1/\gamma[/math] while the length of the sampling is dictated by the smallest frequency we are interested in: [math]T_{samp} \simeq 1/\omega_1 [/math]. For this reason if [math] \omega_1=0 [/math] or [math] \gamma = 0 [/math] simulation time goes to infinity. The response at zero frequency can be calculated as limit of small frequency perturbation. You can have a look to the file src/nloptics/NL_initialize.F to see how simulation lengths are defined. Calculations can take some time, run them in parallel, the best number of processors = number of frequencies or reduce the number of frequencies step in the SHG.

Analysis of the results

In the sampling region we suppose that the polarization can be written as: [math]\bf{P}(t) = \sum_{n=-\infty}^{+\infty} \bf{p}_n e^{-i\omega_n t} [/math] where the coefficient [math]\bf{p}_1,...,\bf{p}_n [/math] are related to [math]\chi^{(1)},...,\chi^{(n)} [/math]. We sample the polarization signal at different times and invert the previous equation by truncating the sum at a finite order. This is done with the command ypp_nl -u that automatically produce an input with the correct values:

nonlinear                    # [R] NonLinear Optics Post-Processing
Xorder=   4                   # Max order of the response functions
% TimeRange
 43.89079 | -1.00000 | fs    # Time-window where processing is done
% 
ETStpsRt= 200                # Total Energy steps
% EnRngeRt
  0.00000 | 10.00000 | eV    # Energy range
%
DampMode= "NONE"             # Damping type ( NONE | LORENTZIAN | GAUSSIAN )
DampFactor=  0.10000   eV    # Damping parameter

where Xorder is the order where the previous sum is truncated, and the TimeRange specifies the sampling region. Notice that differently from the first tutorial, in this case, we do not need Damping in ypp_nl because we already included it in the real-time dynamics. Run ypp and it will produce a file called o.YPP-X_probe_order_2 with the [math]\chi^2_{xyz} [/math], columns 6 and 7. You can plot the result:

SHG in AlAs

and compare it with the [math] \chi^2_{zxy} [/math] calculated with more frequencies and with the converged result on a [math] 18x18x18[/math] k-point grid and bands between 2 and 10. In the figure you can find also the comparison with the results of Ref. [1]. Notice that the QuantumEspresso results are slightly different from the Abinit ones. This is due to the different pseudo-potential employed in the calculations if pseudopotentials were the same calculation would have been identical. You can download the script to generate this plot and the converged results here.

More tutorials on non-linear response (Third harmonic generation, parallelization, spin-orbit etc..) with Yambo can be found here: More Tutorials.

References

  1. Luppi et al. PRB B, 82, 235201(2010)