# TDDFT

## Introduction

Time-Dependent Density Functional Theory (TD-DFT) is a formally exact extension to DFT for electronic excited states. In CASTEP 7.0 we introduced an implementation of linear response TD-DFT based on Hutter's formulation [J. Chem. Phys., 118, 3928-3934 (2003)]. This approach allows direct computation of electronic excited states from perturbation theory. A benefit of this method is that the response wavefunctions for excited states are calculated and can then be used to derive further properties such as optical matrix elements and atomic forces. In the case of atomic forces, a geometry optimisation or molecular dynamics run can be performed for a chosen excitation.

In this tutorial we will compute the electronic excited states of some small molecules, compute optical matrix elements (oscillator strengths) and excited state geometries.

## Input files

On arcus-b the input file can be found and copied using
` $ cp -r /home/jr_yates/jryates/WORKSHOP/TDDFT_tutorial.tgz .`

Input files can be found and copied on ARCHER using` $ cp -r /work/y14/shared/CASTEP_tutorials/TDDFT/ .`

and on the Darwin cluster they can be copied and extracted from` $ cp /usr/local/castep_workshop/files/TDDFT_tutorial.tgz . `

` $ tar -xzf TDDFT_tutorial.tgz `

Alternatively, input files can be downloaded directly: TDDFT_tutorial.tgz

## Exercise 1: N_{2}

Calculate the first 10 singlet excitations of nitrogen using the files `n2_singlet.cell`

and `n2_singlet.param`

. Notice the new parameters to activate and control a TD-DFT calculation:

` spectral_theory`
| `:`
| `tddft `
| Tell the spectral task to use TD-DFT | |

` tddft_num_states`
| ` : `
| `10 `
| Request 10 excited states |

Run the calculation using a job submission script or `castepsub`

as usual. Have a look at the resulting `n2_singlet.castep`

file. After the SCF for the ground state, the TD-DFT calculation starts. Notice the higher memory requirements - with a linear-response calculation each excited state requires storage of a response wave function. The excitation energy (energy above the ground state) for the first 10 excitations is then printed out. Each state will also be labelled by it's character. (For a description of "spurious" states see Heßelmann and Görling PRL **102**, 233003 (2009).)

In addition to the usual CASTEP output, a TD-DFT calculation also produces `n2_singlet.tddft`

. This file gives a summary of the structure, followed by a decomposition of the excited states as a linear combination of Kohn-Sham unoccupied bands/orbitals. That information can be used to infer if an excitation is, for example, from the HOMO to the LUMO. Finally there is a table of each TD-DFT excitation energy, state character and the optical matrix elements.

Triplet excitations can also be calculated. Copy `n2_singlet.cell`

and `n2_singlet.param`

to `n2_triplet.cell`

and `n2_triplet.param`

. Edit `n2_triplet.param`

to add the line `spin_polarised : true`

, and request 20 excited states. Run these new input files through `castepsub`

and compare the output with that for the singlet calculations.

Next we will do a geometry optimisation for the first singlet excitation using the files ` n2_geom.cell`

and `n2_geom.param`

. Take a look at the output files. How much has the bond length changed? Look at the character and Kohn-Sham decomposition of the selected state at the bottom of the `.tddft`

file. Compare this with the initial structure configuration. Can you explain what has happened?

## Exercise 2: Formaldehyde

In this exercise we will calculate the excited state geometry of the first singlet excitation of formaldehyde. Experimentally this state is no longer planar with an out-of-plane angle of 34 degrees. Run the provided files `ch2o.cell`

and `ch2o.param`

to use TD-DFT to compute the excited state structure for the first singlet.

The `.param`

file includes the `write_cell_structure : true`

parameter. Open the resulting `ch2o-out.cell`

file in Jmol so that you can easily measure the out-of-plane angle. Why do you think the resulting structure is still planar?

Modify the initial position of the oxygen atom by changing the Z-coordinate to 0.1 angstrom. This should break the symmetry enough to allow the non-planar structure to be found. Re-run the geometry optimisation and compare the energy of the final structure to the planar one you previously computed. Measure the out-of-plane angle for your final optimised structure.

## Further reading

Details on the CASTEP implementation of linear-response TD-DFT can be found at the below links.

http://www.hector.ac.uk/cse/distributedcse/reports/castep02/
http://www.hector.ac.uk/cse/distributedcse/reports/castep03/