Optical spectra from Sternheimer

We have just seen how to calculate optical spectra in the time domain with a finite perturbation, and in a frequency-domain, linear-response matrix formulation with the Casida equation. Now we will try a third approach, which is in the frequency domain and linear response but rather than using a pseudo-eigenvalue equation as in Casida, uses a self-consistent linear equation, the Sternheimer equation. This approach is also known as density-functional perturbation theory. It has superior scaling, is more efficient for dense spectra, and is more applicable to nonlinear response. One disadvantage is that one needs to proceed one frequency point at a time, rather than getting the whole spectrum at once. We will find we can obtain equivalent results with this approach for the optical spectra as for time propagation and Casida, by calculating the polarizability and taking the imaginary part.

Ground state

Before doing linear response, we need to obtain the ground state of the system, for which we can use the same input file as for Optical spectra from Casida, but we will use a tighter numerical tolerance, which helps the Sternheimer equation to be solved more rapidly. Unlike for Casida, no unoccupied states are required. If they are present, they won’t be used anyway.

CalculationMode = gs
UnitsOutput = eV_angstrom

Radius = 6.5*angstrom
Spacing = 0.24*angstrom

CH = 1.097*angstrom
 "C" |           0 |          0 |           0
 "H" |  CH/sqrt(3) | CH/sqrt(3) |  CH/sqrt(3)
 "H" | -CH/sqrt(3) |-CH/sqrt(3) |  CH/sqrt(3)
 "H" |  CH/sqrt(3) |-CH/sqrt(3) | -CH/sqrt(3)
 "H" | -CH/sqrt(3) | CH/sqrt(3) | -CH/sqrt(3)

ConvRelDens = 1e-7

Linear response

Change the CalculationMode to em_resp and add the lines below to the input file.

5 | 0*eV | 8*eV
9 | 10*eV | 12*eV
EMEta = 0.1*eV

Preconditioner = no
LinearSolver = qmr_dotp
ExperimentalFeatures = yes

The frequencies of interest must be specified, and we choose them based on the what we have seen from the Casida spectrum. The block above specifies 5 frequencies spanning the range 0 to 8 eV (below the resonances) and 9 frequencies spanning the range 10 to 12 eV (where there are peaks). If we didn’t know where to look, then looking at a coarse frequency grid and then sampling more points in the region that seems to have a peak (including looking for signs of resonances in the real part of the polarizability) would be a reasonable approach. We must add a small imaginary part ($\eta$) to the frequency in order to be able to obtain the imaginary part of the response, and to avoid divergence at resonances. The resonances are broadened into Lorentzians with this width. The larger the $\eta$, the easier the SCF convergence is, but the lower the resolution of the spectrum.

To help in the numerical solution, we turn off the preconditioner (which sometimes causes trouble here), and use a linear solver that is experimental but will give convergence much faster than the default one.

Full input file


This Perl script can extract the needed info out of the files in the em_resp directory:

use Math::Trig;
$c = 137.035999679;

$ls = `ls -d em_resp/freq*`;
@list = ($ls =~/em\_resp\/freq_([0-9.]*)/g);
@freqs = sort {$a <=> $b} @list;

print "# Energy (eV)    Re alpha         Im alpha    Cross-section (A^2)\n";
format =
@###.###      @####.#######   @####.########   @####.########
$energy, $Re_alpha    ,  $Im_alpha,         $cross_section

    if ($_ eq "0.0000")
        $Im_alpha = 0;
        $crossfile = `cat em_resp/freq_$_/cross_section`;
        @crossbits = split(' ', $crossfile);
        $energy = $crossbits[26];
        $cross_section = $crossbits[27]; # isotropic average
        $Im_alpha = $c * $cross_section / (4 * pi * $energy);

    $alphafile = `cat em_resp/freq_$_/alpha`;
    @alphabits = split(' ', $alphafile);
    $Re_alpha = $alphabits[15];


Our result is

# Energy (eV)    Re alpha         Im alpha    Cross-section (A^2)
   0.000          2.6399420       0.00000000       0.00000000
   2.000          2.6982850       0.00041753       0.00007658
   4.000          2.8971400       0.00101794       0.00037339
   6.000          3.3481960       0.00234264       0.00128894
   8.000          4.6913730       0.00996672       0.00731168
  10.000          3.5491510       0.04353013       0.03991767
  10.250          4.2029660       0.11944279       0.11226878
  10.500          4.8277720       0.05017816       0.04831469
  10.750          6.7248380       0.07195993       0.07093725
  11.000         10.3714610       0.25085658       0.25304244
  11.250          4.0375190       1.05741417       1.09086960
  11.500         -0.6101760       0.21304879       0.22467363
  11.750          4.2159620       0.26923934       0.29010257
  12.000         -1.1343180       0.22131726       0.24354080

See also

Sternheimer linear response