SECOND_HARMONIC_GENERATION¶
introduction¶
Second harmonic generation (SHG), also called frequency doubling, is a nonlinear optical process, in which photons interacting with a nonlinear material are effectively ‘combined’ to form new photons having twice the frequency of initial photons. The SHG coefficient is defined:
In PYATB, the SHG calculated using two methods. One is the commonly used form which divides SHG into inter- and intra-band parts, shown in the following formula:
This is the most widely used form and is the default method (method 0) of SHG calculation. Secondly SHG could be expressed in the form of multiplying velocity matrices:
This form is generally aligns with the upper formula, while the calculation can be costly for a wide energy range can be contributing to a single energy point.
example¶
Here, we provide an example of calculating the SHG of the GaAs (refer to folder tutorial/GaAs_SHG/).
The Input file is:
INPUT_PARAMETERS
{
nspin 1
package ABACUS
fermi_energy 10.171348972
fermi_energy_unit eV
HR_route ../abacus/OUT.GaAs/data-HR-sparse_SPIN0.csr
SR_route ../abacus/OUT.GaAs/data-SR-sparse_SPIN0.csr
rR_route ../abacus/OUT.GaAs/data-rR-sparse.csr
HR_unit Ry
rR_unit Bohr
max_kpoint_num 100000
}
LATTICE
{
lattice_constant 1.889727
lattice_constant_unit Bohr
lattice_vector
0.0000000000000000 2.7650000000000001 2.7650000000000001
2.7650000000000001 0.0000000000000000 2.7650000000000001
2.7650000000000001 2.7650000000000001 0.0000000000000000
}
SHG
{
omega 0.01 4
domega 0.01
eta 0.05
grid 50 50 50
}
omega: To set the energy range for the SHG, you can adjust it. the unit is eV.
domega: Specifies the energy interval of the omega.
grid: Specifies the uniform k-point grid used to calculate the SHG.
eta: \(\hbar\omega \to \hbar\omega + i \eta\) is used to prevent numerical divergence caused by a zero denominator.
Once the task has been finished, three crucial files are produced in the Out/Second_Harmonic_Generation directory. These files consist of shg_real.dat, shg_imag.dat and plot_shg.py.
The first two files contain the real and imaginary parts of the SHG’s magnitude, and the last one is a plotting script.