Excited States from TDDFT

for helium version of Exciting

Purpose: In this tutorial you will learn how to perform a basic time-dependent density-functional theory (TDDFT) calculation. As an example the momentum-dependent loss function of bulk silver is studied.

## 0. Preparations…

Be sure to have at hand:

• The exciting root directory, EXCITINGROOT, that is, simply the path to the exciting installation directory: (e.g. /home/lisa/programs/exciting …). Note that the root directory can also be a relative path (e.g. ../../).

The EXCITINGROOT variable has to be replaced in the subsequent input files by its actual value (the path itself).
The directories for examples, program binaries, species files and visualization templates are then located at

EXCITINGROOT/examples
EXCITINGROOT/bin
EXCITINGROOT/species
EXCITINGROOT/xml/visualizationtemplates


Note that the shell prompt is denoted by a Dollar sign

$  First the variable$EXCITINGROOT is defined

$echo 'EXCITINGROOT=_exciting_root_directory_' >> ~/.bashrc; . ~/.bashrc  where _exciting_root_directory_ contains the actual path of the exciting installation directory. For the execution of the binaries it is required to add the bin-directory to your path. $ echo 'PATH="$PATH:$EXCITINGROOT/bin"' >> ~/.bashrc; . ~/.bashrc


Important note: all input parameters that will appear will be given in atomic units!

## 1. Ground state calculation

As a starting point for the TDDFT calculation we need a converged density and potential. To this end we perform a groundstate calculation first considering the following input:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="inputtohtml.xsl" type="text/xsl"?>

<input xsi:noNamespaceSchemaLocation="EXCITINGROOT/xml/excitinginput.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsltpath="EXCITINGROOT/xml/"
scratchpath="/tmp">

<title>Loss function of Ag</title>

<structure speciespath="EXCITINGROOT/species/">
<crystal scale="7.72">
<basevect>0.5 0.5 0.0</basevect>
<basevect>0.5 0.0 0.5</basevect>
<basevect>0.0 0.5 0.5</basevect>
</crystal>
<species speciesfile="Ag.xml">
<atom coord="0.0  0.0  0.0" />
</species>
</structure>

<!--
Below is the groundstate part of the input
-->
<groundstate ngridk="10  10  10" />

</input>


To perform the actual calculation, copy and paste the text from above into a file called

input.xml


within a directory of your choice and start the calculation by invoking the exciting executable (serial version) in the background.


### Output files

While the calculation is running you can check the info file for the excited states as well as the resume file which indicates if the program is currently running, and, finally, the terminal output file:

INFOXS.OUT
resume
outputXS.txt


Once the calculation is finished no resume file should be present in the directory. However, a bunch of output files will be present, most of them containing a _QMTxxx label. This stands for Q momentum transfer and corresponds to the label xxx of the Q-points listed in the QPOINTS.OUT file.
We will concentrate on the LOSS_* files and pick the XML output file: LOSS_FXCRPA_QMT001.OUT.xml.
This file contains the data for the loss function and the dynamical structure factor. Get familiar with the details on the output files here.

### Visualizing the output

From the XML data file for the loss function we can generate xmgrace files using the xmlloss2agr.xsl template from the EXCITINGROOT/xml/visualizationtempaltes directory:

$xsltproc --stringparam filename lossfunction$EXCITINGROOT/xml/visualizationtemplates/xmllossfunction2agr.xsl LOSS_FXCRPA_QMT001.OUT.xml


This template will create two xmgrace files, namely

lossfunction_Loss.agr
lossfunction_DynSfac.agr


Right now you have plotted the spectrum including local field effects. You can also apply this template to the loss function file without local field effects.

In order to view these files, invoke the xmgrace program (see xmgrace-quickstart for help on xmgrace)

### Excercise

Once you successfully run the previous TDDFT calculation you can play around with the input parameters to achieve a better quality for the loss function.

• Try to gently increase parameters from the table above, except the basis set size which should be sufficiently large.
• Be careful when increasing the local field effects cutoff, since the calculation might then quickly be very time-consuming.
• It is therefore suggested to get a feeling for the k-mesh first.

### A different kernel

Alternatively, the loss function can be calculated using the ALDA xc kernel, being the simplest non-trivial xc kernel based on an LDA potential for the time-dependent case, which is the static xc potential evaluated at the time-dependent density.
Such a calculation can be performed from scratch or on top the latter one by changing the fxctype attribute in <tddft> element of the input file:

<tddft ... fxctype="ALDA" ...


Moreover, the Kohn-Sham response function and the matrix elements do not have to be recalculated upon a change in the xc kernel. This can be avoided setting the do attribute to fromkernel inside the <tddft> element.

<tddft ... do="fromkernel" ...


The xmgrace file is again generated from the LOSS*.xml files via the XSL template discussed for the RPA case.
Here both results, from the RPA and the ALDA, are compared for a converged 30x30x30 k-mesh:

### Excercise

Once you came that far it should be no problem to do the same type of calculation for a different systems. With a tiny set of changes to the input we can perform a calculation for bulk gold (Au) if we know:

• the lattice constant (can be found e.g. from http://www.webelements.com), use the scale attribute and note that inputs are in bohr!
• that the spacegroup is the same as for Ag
• the species file of Au

Try to do the calculation for Au and do some convergence tests on your own. Compare the results for the spectra to those of Ag.

### Literature

Tutorial talk PDF

Further information on the momentum-dependent loss function of Ag:

• A. Alkauskas, S. Schneider, S. Sagmeister, C. Ambrosch-Draxl, and C. Hèbert, Theoretical analysis of the momentum-dependent loss function of bulk Ag, Ultramicroscopy 110, 1081 (2010) (PDF)

More details on the implementation of the TDDFT formalism within the LAPW method:

• S. Sagmeister, PhD thesis, University of Graz, August 2009 (PDF)