# Tutorial:Optical Spectra from TD:Symmetries

The dynamic polarizability (related to optical absorption cross-section via ) is, in its most general form, a 3x3 tensor. The reason is that we can shine light on the system polarized in any of the three Cartesian axes, and for each of these three cases measure how the dipole of the molecule oscillates along the three Cartesian axes. This usually means that to obtain the full dynamic polarizability of the molecule we usually need to apply 3 different perturbations along , by setting `TDPolarizationDirection`

to 1, 2, or 3.

However, if the molecule has some symmetries, it is in general possible to reduce the total number of calculations from 3 to 2, or even 1. This is explained in detail here. To use this formalism in Octopus, you can use the variables `TDPolarization`

, `TDPolarizationDirection`

, `TDPolarizationEquivAxes`

, and `TDPolarizationWprime`

. The block `TDPolarization`

defines a basis (not necessarily orthogonal) chosen to maximize the number of equivalent axes.
Let us give a couple of examples.

## For methane

The methane molecule has symmetry, which means that the response is identical for all directions. This means that we only need one propagation to obtain the whole tensor. This propagation can be performed in any direction we wish. So we could use the input

%`TDPolarization`

1 | 0 | 0 0 | 1 | 0 0 | 0 | 1 %`TDPolarizationDirection`

= 1`TDPolarizationEquivAxes`

= 3 %`TDPolarizationWprime`

0 | 0 | 1 %

Note that we had omitted the blocks `TDPolarization`

and `TDPolarizationWprime`

in the previous input file, as these are their default values.

When the run is finished, you should find the file ** td.general/multipoles** that contains all the information needed to compute the spectrum of methane. Now, let us rename this file to

**. Yes, you guessed, the suffix**

`td.general/multipoles.1`**has the meaning that it was the run for**

`.1``TDPolarizationDirection`

equal to 1. Running the utility will produce **and**

`cross_section_vector.1`**. The former will have the header:**

`cross_section_tensor`# nspin 1 # kick mode 0 # kick strength 0.010000000000 # pol(1) 1.000000000000 0.000000000000 0.000000000000 # pol(2) 0.000000000000 1.000000000000 0.000000000000 # pol(3) 0.000000000000 0.000000000000 1.000000000000 # direction 1 # Equiv. axis 3 # wprime 0.000000000000 0.000000000000 1.000000000000 # kick time 0.000000000000 #%

and then the body

# Energy (1/3)*Tr[sigma] Anisotropy[sigma] sigma(1,1,1) sigma(1,2,1) sigma(1,3,1) ... # [eV] [A^2] [A^2] [A^2] [A^2] [A^2] ... 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 ... 0.10000000E-01 0.51922187E-09 0.12093134E-10 0.51922187E-09 0.46057845E-12 -0.60377899E-11 ... 0.20000000E-01 0.20467565E-08 0.48314996E-10 0.20467565E-08 0.18401322E-11 0.20467565E-08 ... ...

Try comparing the spectrum for each component of the tensor.

## Linear molecule

Now let us look at a linear molecule. In this case, you might think that we need two calculations to obtain the whole tensor, one for the direction along the axis of the molecule, and another for the axis perpendicular to the molecule. The fact is that we need only one, in a specially chosen direction, so that our field has components both along the axis of the molecule and perpendicular to it. Let us assume that the axis of the molecule is oriented along the axis. Then we can use

%`TDPolarization`

1/sqrt(2) | -1/sqrt(2) | 0 1/sqrt(2) | 1/sqrt(2) | 0 1/sqrt(2) | 0 | 1/sqrt(2) %`TDPolarizationDirection`

= 1`TDPolarizationEquivAxes`

= 3 %`TDPolarizationWprime`

1/sqrt(2) | 0 | 1/sqrt(2) %

You should try to convince yourself that the three axes are indeed equivalent and linearly independent.

## Planar molecule

Finally, let us look at a general planar molecule (in the *xy* plane). In principle we need only two calculations (that is reduced to one if more symmetries are present like, *e.g.*, in benzene). In this case we chose one of the polarization axes on the plane and the other two rotated 45 degrees:

%`TDPolarizationDirection`

1/sqrt(2) | 0 | 1/sqrt(2) 1/sqrt(2) | 0 |-1/sqrt(2) 0 | 1 | 0 %`TDPolarizationEquivAxes`

= 2

In this case, we need two runs, one for `TDPolarizationDirection`

equal to 1, and another for it equal to 3. Note that if there are less than 3 equivalent axes, `TDPolarizationWprime`

is irrelevant.