OpticalSpectrum

class OpticalSpectrum(configuration, kpoints=None, energies=None, broadening=None, bands_below_fermi_level=None, bands_above_fermi_level=None, optical_intraband_parameters=None, method=None)

Constructor for the optical spectrum object.

Parameters:
  • configuration (BulkConfiguration) – The bulk configuration with an attached calculator for which to calculate the optical spectrum.
  • kpoints (sequence (size 3) of int | MonkhorstPackGrid | KpointDensity) – The k-points for which to calculate the transitions.
    Default: The Monkhorst-Pack grid used for the self-consistent calculation.
  • energies (PhysicalQuantity of type energy) – The energies for which to calculate the optical spectrum.
    Default: numpy.linspace(0, 4, 101)*eV
  • broadening (PhysicalQuantity of type energy) – The broadening parameter used for the optical spectrum.
    Default: 0.1 * eV
  • bands_below_fermi_level (int) – The maximum number of valence bands per principal spin channel to include at each k-point. If the number specified is larger than the actual number of occupied states, all are used.
    Default: 4
  • bands_above_fermi_level (int) – The maximum number of conduction bands per principal spin channel to include at each k-point. If the total number of requested bands is larger than the basis size, the maximally possible number of bands is used.
    Default: 4
  • optical_intraband_parameters (OpticalIntrabandParameters | None) – If given the intraband contribution will be included in the OpticalSpectrum. This container should hold the plasma_frequency and inverse_life_time parameters.
    Default: None, i.e. optical intraband parameters is not included.
  • method (None | Full | KDotPExpansion3D) –

    The method used for the eigenvalue and transition matrix elements computation.

    The default is to perform an exact diagonalization to determine the eigenvalues and the wave-functions, with which we calculate the momentum matrix elements, exactly at each requested k-point.

    Alternatively, the k.p expansion method can be used to interpolate the eigenvalues and the transition matrix elements at the requested k-points using the exact eigenvalues and eigenfunctions calculated in the SCF calculation.

    NOTE: Only the PlaneWaveCalculator supports the k.p method at the moment.

absorption(spin=None)
Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The absorption tensor, the dimension is (3, 3, N), where N is the number of energies.
Return type:ndarray.
broadening()
Returns:The broadening parameter used for the optical spectrum.
Return type:PhysicalQuantity of type energy
energies()
Returns:The energies for which to calculate the optical spectrum.
Return type:PhysicalQuantity of type energy
evaluateDielectricConstant(spin=None)

Function for evaluating the real part of the dielectric constant using the Kubo-Greenwood formalism.

Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The real part of the dielectric constant.
Return type:numpy.array
evaluateImaginaryDielectricConstant(spin=None)

Function for evaluating the imaginary part of the dielectric constant using the Kubo- Greenwood formalism.

Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The imaginary part of the dielectric constant.
Return type:numpy.array
evaluateImaginaryPolarizability(spin=None)

Function for evaluating the imaginary part of the polarizability using the Kubo-Greenwood formalism.

Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The imaginary part of the polarizability.
Return type:PhysicalQuantity with the unit Hartree**3 * vacuum_permitivity
evaluatePolarizability(spin=None)

Function for evaluating the real part of the polarizability using the Kubo-Greenwood formalism.

Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The real part of the polarizability.
Return type:PhysicalQuantity with the unit Hartree**3 * vacuum_permitivity
imaginarySusceptibility(spin=None)
Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:Imaginary part of the susceptibility tensor.
Return type:numpy.ndarray.
maxConductionStates()
Returns:The maximum number of conduction states to include.
Return type:int
maxValenceStates()
Returns:The maximum number of valence states to include.
Return type:int
metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
nlprint(stream=None)

Print a string containing an ASCII table useful for plotting the AnalysisSpin object.

Parameters:stream (python stream) – The stream the table should be written to.
Default: NLPrintLogger()
opticalConductivity(spin=None)
Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The optical conductivity, the dimension is (3, 3, N), where N is the number of energies.
Return type:ndarray.
opticalIntrabandParameters()
Returns:The optical_intraband_parameters set on the optical spectrum.
Return type:OpticalIntrabandParameters
realSusceptibility(spin=None)
Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:Real part of the susceptibility tensor.
Return type:numpy.ndarray.
reflectivity(spin=None)
Parameters:spin (Spin.Up | Spin.Down | Spin.Sum) – The spin to calculate for.
Default: Spin.Sum
Returns:The reflectivity tensor, the dimension is (3, 3, N), where N is the number of energies.
Return type:Dimensionless ndarray.
setMetatext(metatext)

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

Usage Examples

Calculate the OpticalSpectrum of silicon, save it to a file, and print out the dielectric tensor:

# Set up silicon crystal.
bulk_configuration = BulkConfiguration(
    bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
    elements=[Silicon, Silicon],
    cartesian_coordinates=[[ 0.     , 0.     , 0.],
                           [ 1.35765, 1.35765, 1.35765]]*Angstrom
    )
# Setup calculator.
numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(6, 6, 6),
    )

# Setup DFT calculator using TB09 meta-GGA.
calculator = LCAOCalculator(
    basis_set=LDABasis.DoubleZetaDoublePolarized,
    exchange_correlation=MGGA.TB09LDA,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    )
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# Optical spectrum.
optical_spectrum = OpticalSpectrum(
    configuration=bulk_configuration,
    kpoints=MonkhorstPackGrid(15,15,15),
    energies=numpy.linspace(0,5,101)*eV,
    broadening=0.1*eV,
    bands_below_fermi_level=4,
    bands_above_fermi_level=4,
    )

nlsave('si_optical.hdf5', optical_spectrum)

# Print out the dielectric constant (Experimental value is 11.9).
print('Dielectric Tensor')
print(optical_spectrum.evaluateDielectricConstant()[:,:,0])

si_optical.py

Notes

  • We use the Kubo-Greenwood formula to calculate the susceptibility tensor [oHar70][oSG93]

    \[\chi_{ij}(\omega) = \frac{e^2}{\hbar m_e^2 V} \sum_{nm\mathbf{k}} \frac{f_{m\mathbf{k}}-f_{n\mathbf{k}}}{\omega_{nm}^2(\mathbf{k}) [\omega_{nm}(\mathbf{k})- \omega - i \Gamma/\hbar]} p_{nm}^i(\mathbf{k}) p_{mn}^j(\mathbf{k})\,,\]

    where \(p_{nm}^i = \langle n\mathbf{k} \lvert \mathbf{p}^i \rvert m\mathbf{k}\rangle\) is the \(i\)-th component (labeling electrons) of the momentum operator between state \(n\) and \(m\), \(m_e\,(e)\) is the electron mass (charge), \(V\) the volume, \(\Gamma\) the energy broadening, \(\hbar\omega_{nm}=E_{n}-E_{m}\) and \(f_{n\mathbf{k}}\) the Fermi function evaluated at the band energy \(E_{n}(\mathbf{k})\).

  • The response coefficients, the relative dielectric constant, \(\epsilon_r\), polarizability, \(\alpha\), and optical conductivity, \(\sigma\), are related to the susceptibility as

    \[ \begin{align}\begin{aligned}\epsilon_r(\omega) &= (1 + \chi(\omega) ),\\\alpha(\omega) &= V \epsilon_0 \chi(\omega),\\\sigma(\omega) &= - i \omega \epsilon_0 \chi(\omega).\end{aligned}\end{align} \]

    The derivation of the last relation can be found in Ref. [oMar04].

    Note

    Accounting for spin, the relation between the dielectric constant and the susceptibility can be written as \(\epsilon_r(\omega) = 1 + \sum_\sigma \chi_\sigma(\omega).\) The dielectric constant has no explicit spin dependency. For calculations of type polarized, textual representations of the susceptibility will show the spin resolved result, i.e. Spin.Up and Spin.Down components while the sum over spins always is given for the dielectric constant. Nonetheless, it is possible to obtain the “spin-resolved dielectric constant” using the corresponding query methods with either Spin.Up or Spin.Down for the spin parameter. In these cases, the vacuum contribution is split up equally between up and down components. This feature is maintained for backward compatibility reasons and might disappear in future releases.

  • The refractive index, \(n\), is related to the complex dielectric constant through

    \[n + i \kappa = \sqrt{\epsilon_r},\]

    here \(\kappa\) is the extinction coefficient. In terms of the real (\(\epsilon_1\)) and complex parts (\(\epsilon_2\)) of the dielectric constant

    \[ \begin{align}\begin{aligned}n &= \sqrt{\frac{\sqrt{\epsilon_1^2+\epsilon_2^2}+\epsilon_1}{2}},\\\kappa &= \sqrt{ \frac{ \sqrt{ \epsilon_1^2+ \epsilon_2^2} - \epsilon_1}{2}}.\end{aligned}\end{align} \]
  • The optical absorption coefficient is related to the extinction coefficient through [oGri99]

    \[\alpha_a = 2 \frac{\omega}{c} \kappa.\]

    The reflectivity is given by [oDes05]

    \[R = \frac{(1-n)^2 + \kappa^2}{(1+n)^2 + \kappa^2}.\]
  • The definition of bands_above_fermi_level and bands_below_fermi_level depends on the spin type of the calculation, as described in the Notes of the EffectiveMass analysis object.

Thus from the dielectric constant a number of other optical properties are easily obtained. For further background information on optical spectra see Optical response functions.

Intraband contribution

In metals both the interband term described above and an intraband term from plasmons contribute to the dielectric response, \(\chi_{ij} = \chi^{\mathrm{inter}}_{ij}+\chi^{\mathrm{intra}}_{ij}\). Within the Drude model of free electrons we can obtain the intraband contribution as [ovSEB+09]

\[\chi^{\mathrm{intra}}_{ij}(\omega) = -\frac{\omega_{\mathrm{P},ij}^{2}}{\omega^2+ i \omega \gamma} = -\frac{\omega_{\mathrm{P},ij}^{2}}{\omega^2+ \gamma^2} + i \frac{\omega_{\mathrm{P},ij}^{2} \gamma}{\omega^3 + \omega\gamma^2}\]

Here \(\omega_{\mathrm{P}}\) is the plasma frequency and \(\gamma(T) = \hbar / \tau(T)\) is a temperature dependent broadening obtained from the phonon limited life-time \(\tau(T)\). The plasma frequency can be obtained from the band energies and velocities integrated over the Fermi surface:

\[\omega_{\mathrm{P},ij}^{2} = \frac{e^{2}}{V \varepsilon_0} \sum_{n, \mathbf{k}} g_s g_k \mathbf{v}_{i}(n\mathbf{k})\mathbf{v}_{j}(n\mathbf{k})\delta(\epsilon_F - \epsilon_{n\mathbf{k}})\]

Here \(V\) is the unit cell volume, \(g_s\) is the spin degeneracy factor, \(g_k\) is the \(\mathbf{k}\)-point weights, \(\mathbf{v}(n\mathbf{k}) = 1/ \hbar \partial \epsilon_{n\mathbf{k}} / \partial \mathbf{k}\) is the band velocity of a band indexed \(n\) and \(i, j\) are Cartesian directions.

The plasma frequency can be set to a known value or obtained from the following example:

plasma_frequency = calculatePlasmaFrequency(
    bulk_configuration,
    electron_bands=electron_bands,
    kpoints_grid=MonkhorstPackGrid(15, 15, 15),
    use_kpoint_symmetry=True)

Here electron_bands is a list of indices of electron bands included.

The intraband contribution is included in the optical spectrum calculation if the optional input optical_intraband_parameters = OpticalIntrabandParameters(plasma_frequency, inverse_life_time) is supplied to the OpticalSpectrum:

optical_spectrum = OpticalSpectrum(
    bulk_configuration,
    kpoints=MonkhorstPackGrid(15, 15, 15),
    energies=numpy.linspace(0, 5, 101) * eV,
    broadening=0.1 * eV,
    bands_above_fermi_level=4,
    bands_below_fermi_level=4,
    optical_intraband_parameters=OpticalIntrabandParameters(0.1 * eV, 1.8 * femtoSecond**(-1)),
)

The plasma_frequency can be a single number (as the above example) or a tensor (as obtained by the full calculation). The phonon limited inverse_life_time can be obtained from the ElectronPhononCoupling or Mobility analysis objects.

[oDes05]M. P. Desjarlais. Density functional calculations of the reflectivity of shocked xenon with ionization based gap corrections. Contrib. Plasma Phys., 45(3-4):300–304, 2005. doi:10.1002/ctpp.200510034.
[oGri99]David J. Griffiths. Introduction to Electrodynamics (3rd Edition). Prentice Hall, 1999. ISBN 9780138053260.
[oHar70]Walter A. Harrison. Solid State Theory. McGraw-Hill, 1970.
[oMar04]Richard M. Martin. Electronic structure: Basic theory and practical methods. Cambridge University Press, New York, 2004. ISBN 0-521-78285-6.
[oSG93]J. E. Sipe and Ed Ghahramani. Nonlinear optical response of semiconductors in the independent-particle approximation. Phys. Rev. B, 48(16):11705–11722, October 1993. URL: https://link.aps.org/doi/10.1103/PhysRevB.48.11705, doi:10.1103/PhysRevB.48.11705.
[ovSEB+09]Michiel J. van Setten, Süleyman Er, Geert Brocks, Robert A. de Groot, and Gilles A. de Wijs. First-principles study of the optical properties of Mg$_x$Ti$_1-x$H$_2$. Phys. Rev. B, 79(12):125117, mar 2009. URL: https://link.aps.org/doi/10.1103/PhysRevB.79.125117, doi:10.1103/PhysRevB.79.125117.