# Difference between revisions of "Manual:Linear Response"

(24 intermediate revisions by 9 users not shown) | |||

Line 1: | Line 1: | ||

− | + | {{Octopus}} can calculate dynamic polarizabilities and first-order hyperpolarizabilites in a linear-response scheme using the Sternheimer equation. It is also possible to calculate optical spectra with this technique, but it is slower than time-evolution. | |

− | + | ===== Ground state ===== | |

− | + | The first thing we will need for linear response is a [[Manual:Ground State|Ground State]] calculation. Unlike the Casida approach, when using the Sterheimer equation you needn't do a unoccupied-states calculation. To improve the convergence of the linear-response calculation, it is better to use tightly converged wavefunctions. For example, you can add these parameters to your gs calculation: | |

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

<pre> | <pre> | ||

EigenSolverFinalTolerance = 1e-10 | EigenSolverFinalTolerance = 1e-10 | ||

+ | ConvRelDens = 1e-9 | ||

+ | </pre> | ||

− | + | ===== Input ===== | |

− | |||

− | |||

− | |||

− | |||

− | + | The {{Variable|CalculationMode|Calculation_Modes}} for polarizability calculations is {{code|em_resp}}. The main parameter you have to specify is the frequency of the perturbation, given by the {{Variable|EMFreqs|Linear_Response}} block. You can also add an imaginary part to the frequency by setting the variable {{Variable|EMEta|Linear_Response}}. Adding a small imaginary part is required if you want to get the imaginary part of the polarizability or to calculate polarizabilities near resonance; a reasonable value is {{code|0.1 eV}}. | |

− | + | To get the hyperpolarizabilties, you also have to specify the variable {{Variable|EMHyperpol|Linear_Response}} with the three coefficients with respect to the base frequency; the three values must sum to zero. | |

+ | ===== Output ===== | ||

− | + | After running, for each frequency in the input file, {{octopus}} will generate a subdirectory under {{file|em_resp/}}. In each subdirectory there is a file called {{file|alpha}} that contains the real part of the polarizability tensor <math>\alpha_{ij}</math> and the average polarizability | |

<math> | <math> | ||

− | \bar{\alpha}=\frac13\sum_{i=1}^3\ | + | \bar{\alpha}=\frac13\sum_{i=1}^3\alpha_{ii}\, |

</math> | </math> | ||

− | + | The imaginary part <math>\eta</math> is written to file {{file|eta}}. If <math>\eta > 0</math>, there is also a file called {{file|cross_section_tensor}} that contains the photo-absorption cross section tensor for that frequency, related to the imaginary part of the polarizability (<math>\sigma = \frac{4 \pi \omega}{c} \mathrm{Im} \alpha </math>). | |

+ | |||

+ | The hyperpolarizability will be in a file called {{file|beta}} at the base frequency, containing all the 27 components and some reduced quantities: | ||

<math> | <math> | ||

− | + | \beta_{||\,i} = \frac15 \sum_{j=1}^3(\beta_{ijj}+\beta_{jij}+\beta_{jji})\ . | |

</math> | </math> | ||

+ | |||

+ | Optionally, Born charges can also be calculated. | ||

==== Finite differences ==== | ==== Finite differences ==== | ||

− | In this mode only static polarizability can be obtained | + | In this mode only static polarizability can be obtained. The calculation is done by taking the numerical derivative of the energy with respect to an external static and uniform electric field. To use this, run with {{Variable|ResponseMethod|Linear_Response}} {{code|{{eq}}finite_differences}}. {{octopus}} will run several ground-state energy calculations and then calculate the polarizability using a finite-differences formula for the derivative. The results will be in the {{file|em_resp_fd}} directory. Hyperpolarizability and Born charges can also be calculated. |

− | + | {{manual_foot|prev=Manual:Casida|next=Manual:Optimal Control}} | |

− | {{manual_foot}} |

## Latest revision as of 13:01, 7 September 2016

Octopus can calculate dynamic polarizabilities and first-order hyperpolarizabilites in a linear-response scheme using the Sternheimer equation. It is also possible to calculate optical spectra with this technique, but it is slower than time-evolution.

##### Ground state

The first thing we will need for linear response is a Ground State calculation. Unlike the Casida approach, when using the Sterheimer equation you needn't do a unoccupied-states calculation. To improve the convergence of the linear-response calculation, it is better to use tightly converged wavefunctions. For example, you can add these parameters to your gs calculation:

EigenSolverFinalTolerance = 1e-10 ConvRelDens = 1e-9

##### Input

The `CalculationMode`

for polarizability calculations is `em_resp`

. The main parameter you have to specify is the frequency of the perturbation, given by the `EMFreqs`

block. You can also add an imaginary part to the frequency by setting the variable `EMEta`

. Adding a small imaginary part is required if you want to get the imaginary part of the polarizability or to calculate polarizabilities near resonance; a reasonable value is `0.1 eV`

.

To get the hyperpolarizabilties, you also have to specify the variable `EMHyperpol`

with the three coefficients with respect to the base frequency; the three values must sum to zero.

##### Output

After running, for each frequency in the input file, Octopus will generate a subdirectory under ** em_resp/**. In each subdirectory there is a file called

**that contains the real part of the polarizability tensor and the average polarizability**

`alpha`

The imaginary part is written to file ** eta**. If , there is also a file called

**that contains the photo-absorption cross section tensor for that frequency, related to the imaginary part of the polarizability ().**

`cross_section_tensor`The hyperpolarizability will be in a file called ** beta** at the base frequency, containing all the 27 components and some reduced quantities:

Optionally, Born charges can also be calculated.

#### Finite differences

In this mode only static polarizability can be obtained. The calculation is done by taking the numerical derivative of the energy with respect to an external static and uniform electric field. To use this, run with `ResponseMethod`

`=finite_differences`

. Octopus will run several ground-state energy calculations and then calculate the polarizability using a finite-differences formula for the derivative. The results will be in the ** em_resp_fd** directory. Hyperpolarizability and Born charges can also be calculated.