Real-time TDDFT absorption spectrum (H₂O)
Real-time TDDFT with riper: a weak, short electric-field pulse applied to the converged PBE ground state excites all dipole-allowed transitions at once, and the Fourier transform of the time-dependent dipole moment gives the absorption spectrum.
$fields with electric on enables an external field, and $electric field defines a Gaussian pulse with amplitude 2.0·10⁻⁵ au along x, y and z, centered at tzero=3.0 au with width=0.2 au. In $rttddft, magnus 2 selects the second-order Magnus propagator and scf off the predictor–corrector scheme; time 1000.0 and tstep 0.2 give the propagation time and the time step in au, print step 1 writes data at every step, and min energy, max energy and energy step set the spectral window, 0.0735 to 0.735 hartree (2 to 20 eV), and its sampling. $rtdipol, $rtenergy and $rtspectrum ev request the dipole, energy and spectrum files. $riper carries no options. $coord file=coord, $atoms with basis =def2-SVP (RI-J auxiliary basis from the library) and $dft with functional pbe complete the input.
rtspec receives the spectrum, rtdipo the dipole moment and rtenrgy the energies; the total energy in rtenrgy must stay constant after the pulse. The peaks agree with linear-response TDDFT (escf) within the spectral resolution.
Run
In the directory that holds the files below:
riper > riper.out
control
$coord file=coord
$atoms
basis =def2-SVP
$dft
functional pbe
$riper
$fields
electric on
$electric field
amplitude x=2.0E-5 y=2.0E-5 z=2.0E-5
gaussian tzero=3.0 width=0.2
$rttddft
magnus 2
scf off
time 1000.0
tstep 0.2
print step 1
min energy = 0.0735
max energy = 0.735
energy step 1.0d-3
$rtdipol
$rtenergy
$rtspectrum ev
$end
coord
$coord
0.00000000000000 0.00000000000000 -0.12178983933899 o
1.41713420892173 0.00000000000000 0.96657854674257 h
-1.41713420892173 0.00000000000000 0.96657854674257 h
$end