# Difference between revisions of "Manual:Linear Response"

Line 13: | Line 13: | ||

In this method the derivative of the energy is calculated analytically through Density Functional Perturbation Theory, is faster and more reliable that the previous method and also calculates the first hyperpolarizability tensor. | In this method the derivative of the energy is calculated analytically through Density Functional Perturbation Theory, is faster and more reliable that the previous method and also calculates the first hyperpolarizability tensor. | ||

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

+ | |||

+ | To do a polarizability calculation you need a gs calculation for the system with very well converged wave functions, the following convergency parameters are recommended: | ||

<pre> | <pre> | ||

Line 24: | Line 26: | ||

</pre> | </pre> | ||

− | After that you can calculate the hyperpolarizabity using ''RunMode = pol_lr''. | + | === Polarizability === |

+ | |||

+ | After that you can calculate the hyperpolarizabity using ''RunMode = pol_lr''. This will run a self consistent iteration for each dimension, each one takes about 10-20 steps and the calculation time is about the same for the ground state. The results will be in the ''linear/'' directory in two files: | ||

+ | |||

+ | |||

+ | * The ''polarizability_lr'' file contains the static polarizability <math>\alpha_i</math> given as a matrix and the mean static polarizablity | ||

+ | |||

+ | <math> | ||

+ | \bar{\alpha}=\frac13\sum_{i=1}^3\alpha_ii | ||

+ | </math> | ||

+ | |||

+ | * The ''beta_lr'' file which contains the first static hyperpolarizability <math>\beta_{ijk}</math> given by components and the values <math>\beta_{||i}</math> defined as | ||

+ | |||

+ | <math> | ||

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

+ | </math> | ||

+ | |||

+ | Finally some differences between components that should be equal are given. In theory the hyperpolarizabilities are symmetrical (they can be seen as partial derivatives of the energy), but we don't get the same values for different components and sometimes differences are considerable, it is not still clear why. |

## Revision as of 14:33, 9 January 2006

## Contents

# Calculate Polarizabolities and Hyperpolarizabilites with Octopus

With version 2.0rc1 the calculation of static polarizability () and the first hyperpolarizability () is supported. There are two ways to do this:

## Finite differences

This is calculated doing a numerical derivative of the total energy with respect to an applied electric field, it only gives the polarizability.

To use this run with *RunMode = pol*, this will do several ground state calculations. The resulting tensor will be in the *linear/polarizability* file.

## Linear Response

In this method the derivative of the energy is calculated analytically through Density Functional Perturbation Theory, is faster and more reliable that the previous method and also calculates the first hyperpolarizability tensor.

### Ground state

To do a polarizability calculation you need a gs calculation for the system with very well converged wave functions, the following convergency parameters are recommended:

EigenSolverFinalTolerance = 1e-10 ConvAbsDens = 0 ConvRelDens = 0 ConvAbsEv = 1e-10 ConvRelEv = 0

### Polarizability

After that you can calculate the hyperpolarizabity using *RunMode = pol_lr*. This will run a self consistent iteration for each dimension, each one takes about 10-20 steps and the calculation time is about the same for the ground state. The results will be in the *linear/* directory in two files:

- The
*polarizability_lr*file contains the static polarizability given as a matrix and the mean static polarizablity

- The
*beta_lr*file which contains the first static hyperpolarizability given by components and the values defined as

Finally some differences between components that should be equal are given. In theory the hyperpolarizabilities are symmetrical (they can be seen as partial derivatives of the energy), but we don't get the same values for different components and sometimes differences are considerable, it is not still clear why.