ElectroOpticalTensor

class ElectroOpticalTensor(configuration, dielectric_tensor, raman_spectrum, second_harmonics_generation_susceptibility=None, phonon_modes=None, use_principal_axes=None, apply_symmetries=None)

Constructor for the electro-optical (Pockels) tensor object.

Parameters:
  • configuration (BulkConfiguration) – The bulk configuration with an attached calculator for which to calculate the electro-optical response.

  • dielectric_tensor (DielectricTensor) – The dielectric_tensor object evaluated at zero energy.

  • raman_spectrum (RamanSpectrum) – The raman_spectrum object calculated by the user.

  • second_harmonics_generation_susceptibility (SecondHarmonicsGenerationSusceptibility) – The second_harmonics_generation_susceptibility object evaluated at zero energy. If None only the ionic terms are calculated.
    Default: None

  • phonon_modes (list with positive ints | All) – The phonon modes to include.
    Default: All (All phonon modes are included).

  • use_principal_axes (bool) – Keyword flag specifying if the expression for coinciding crystal and principal axes should be used.
    Default: False

  • apply_symmetries (bool) – Keyword flag specifying if the symmetries should be enforced.
    Default: True

applySymmetries()
Returns:

True if tensors are symmetrized.

Return type:

bool

clampedElectronicElectroOpticalTensor()
Returns:

The clamped electronic part of the electro-optical/Pockels tensor. Dimension is (3,3,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedElectronicElectroOpticalVoigtTensor(contribution='Average')
Returns:

The clamped ionic part of the electro-optical/Pockels tensor in Voigt notation. Dimension is (6,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedIonicElectroOpticalTensor()
Returns:

The clamped ionic part of the electro-optical/Pockels tensor. Dimension is (3,3,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedIonicElectroOpticalTensorModes()
Returns:

The clamped ionic part of the electro-optical/Pockels tensor for individual modes. Dimension is (3,3,3,M) where M is the number of phonon modes.

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedIonicElectroOpticalVoigtTensor(contribution='Average')
Returns:

The clamped ionic part of the electro-optical/Pockels tensor in Voigt notation. Dimension is (6,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedIonicElectroOpticalVoigtTensorModes(contribution='Average')
Returns:

The clamped ionic part of the electro-optical/Pockels tensor in Voigt notation for individual modes. Dimension is (6,3,M) where M is the number of phonon modes.

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedTotalElectroOpticalTensor()
Returns:

The sum of clamped electronic and ionic electro-optical/Pockels tensor. Dimension is (3,3,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

clampedTotalElectroOpticalVoigtTensor(contribution='Average')
Returns:

The sum of clamped electronic and ionic electro-optical/Pockels tensor in Voigt notation. Dimension is (6,3).

Return type:

PhysicalQuantity with the unit picoMeter / Volt.

dynamicDielectricTensor()
Returns:

The dynamic dielectric constant tensor - i.e. excluding the ionic contribution. Dimension is (3,3).

Return type:

Dimensionless ndarray.

imaginaryRefractiveIndex()
Returns:

The imaginary part of the refractive index including the ionic contribution. Dimension is (3,3).

Return type:

Dimensionless ndarray.

metatext()
Returns:

The metatext of the object or None if no metatext is present.

Return type:

str | 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()

phononEnergies()
Returns:

The phonon eigenenergies.

Return type:

PhysicalQuantity of type energy.

phononModes()

Query method for the phonon modes.

Returns:

The list of phonon mode indices used in the calculation.

Return type:

list of int.

phononWaveNumbers()
Returns:

The phonon wave numbers calculated from the phonon frequencies.

Return type:

PhysicalQuantity of type inverse length.

realRefractiveIndex()
Returns:

The real part of the refractive index including the ionic contribution. Dimension is (3,3).

Return type:

Dimensionless ndarray.

setMetatext(metatext)

Set a given metatext string on the object.

Parameters:

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

staticDielectricTensor()
Returns:

The static dielectric constant tensor - i.e. including the ionic contribution. Dimension is (3,3).

Return type:

Dimensionless ndarray.

uniqueString()

Return a unique string representing the state of the object.

usePrincipalAxes()
Returns:

True if expression for coinciding crystal and principal axes was used.

Return type:

bool

Usage Examples

Calculate the static ElectroOpticalTensor of a configuration including both ionic and electronic contributions.

electro_optical_tensor = ElectroOpticalTensor(
  configuration,
  dielectric_tensor,
  raman_spectrum,
  second_harmonics_generation_susceptibility,
  phonon_modes,
  use_principal_axes,
  apply_symmetries)

The clamped electro-optical (Pockels) tensor will be evaluated from the zero energy DielectricTensor and the RamanSpectrum objects. The SecondHarmonicsGenerationSusceptibility is optional as input for addition of the electronic contribution to the tensor.

Notes

The change in the inverse static dielectric tensor, \(\epsilon_r^{-1}\), in the presence of an external electric field, \(E_{\alpha}\), is:

\[\Delta(\epsilon_r^{-1})_{ij} = \sum_{\alpha=1}^{3} r_{ij\alpha} E_{\alpha} + ...\]

where the rank 3 tensor, \(r_{ijk}\), is the electro-optical (EO) tensor. The clamped EO tensor (neglecting piezoelectric terms) has two contributions [1]: an electronic term related to the modification of the electronic structure for fixed ions positions (displacements \(\mathbf{u}=0\)) and a ionic term related to field-induced ion displacements.

The inverse modification in the equation above can be related to the direct variation through the zero-field dielectric tensor as

\[\begin{split}\Delta(\epsilon_r^{-1})_{ij} &=& -\sum_{m,n=1}^{3} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{im} \Delta\epsilon_{r, mn} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{nj}\,,\\ \Delta\epsilon_{r,mn} &=& \Delta\epsilon_{r, mn}^{el} + \Delta\epsilon_{r, mn}^{ion}\end{split}\]

The electronic and ionic change in the dielectric tensor refers to the partial derivatives \(\frac{d\epsilon_{r,mn}}{dE_{\gamma}} = \left.\frac{\partial\epsilon_{r, ij}}{\partial E_{\gamma}}\right|_{u=0} + \left.\frac{\partial\chi^{(1)}_{r, ij}}{\partial E_{\gamma}}\right|_{E_{\gamma}=0}\). The optical carrier frequency is assumed high so that the dynamic (high frequency) dielectric tensor \(\epsilon_{r}^{\infty}\) can be used in the projection [2]. The electronic part is related to the second harmonic generation susceptibility, \(\chi^{(2)}\):

\[\left.\frac{\partial\epsilon_{r, ij}}{\partial E_{\gamma}}\right|_{u=0} = 2 \chi^{(2)}_{ij\gamma}\]

The ionic part is obtained from the Raman susceptibility, \(\alpha^{\lambda}_{ij}\), and infrared mode polarity, \(p^{\lambda}_{\alpha}\), of phonon \({\lambda}\) with angular frequency \(\omega_{\lambda}\):

\[\left.\frac{\partial\chi^{(1)}_{r, ij}}{\partial E_{\gamma}}\right|_{E_{\gamma}=0} = \sum_{\lambda} \left.\frac{\partial\chi^{(1)}_{r, ij}}{\partial u_{\lambda}}\right|_{E_{\gamma}=0} \frac{\partial u_{\lambda}}{\partial E_{\gamma}} = \frac{1}{\Omega_0} \sum_{\lambda} \frac{\alpha^{\lambda}_{ij} p^{\lambda}_{\gamma}}{\omega^{2}_{\lambda}}\]

where we defined the Raman tensor \(\alpha^{\lambda}_{ij} = \Omega_0 \left.\partial\chi^{(1)}_{r, ij}/\partial u_{\lambda}\right|_{E_{\gamma}=0}\), and used that \(\partial u_{\lambda}/\partial E_{\gamma} = p^{\lambda}_{\gamma}/\omega_{\lambda}^2\). \(\Omega_0\) is the unit cell volume. The infrared mode polarity is given by:

\[p^{\lambda}_{\alpha} = \sum_{i, \beta} Z_{\alpha \beta}(i) e_{\beta}^{\lambda}/\sqrt{m_{i}},\]

where \(Z_{\alpha \beta}(i)\) is the Born effective charge tensor for atom \(i\) with mass \(m_{i}\) and \(e_{\beta}^{\lambda}\) is the eigendisplacement of phonon mode \(\lambda\) with frequency \(\omega_{\lambda}\).

These factors are obtained from the RamanSpectrum, and DielectricTensor analysis objects, respectively. From these relations we can evaluate the clamped EO tensor. Inserting the partial derivatives we see that

\[\begin{split}r_{ij\gamma}^{el} &=& -\sum_{m,n=1}^{3} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{im} 2 \chi^{(2)}_{mn\gamma} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{nj} \, ,\\ r_{ij\gamma}^{ion} &=& -\sum_{m,n=1}^{3} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{im} \frac{1}{\Omega_0} \sum_{\lambda} \frac{\alpha^{\lambda}_{mn} p^{\lambda}_{\gamma}}{\omega^{2}_{\lambda}} \left(\left(\epsilon_{r}^{\infty}\right)^{-1}\right)_{nj}\end{split}\]

In Voigt notation we contract the first two indices into six-vector notation, \(r_{ij\alpha}\rightarrow r_{l\alpha}\), where \(l={1,...,6}\) for \(\{ij\} = xx, yy, zz, yz=zy, zx=xz, xy=yx\).

Usage Example

This example script illustrates the full workflow of the ElectroOpticalTensor calculation and display a summary of results:

filename = 'ElectroOpticalTensorWorkflow.hdf5'

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
lattice = SimpleTetragonal(4.070385412109747*Angstrom, 4.115226913895633*Angstrom)

# Define elements
elements = [Barium, Titanium, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.028650982641, -0.028665746616,  0.087957144726],
                          [ 0.544026489212,  0.455959167129,  0.605611994272],
                          [ 0.515281929165,  0.484708002041,  1.05622848206 ],
                          [ 0.514348270569, -0.004594374366,  0.570135591311],
                          [ 0.00458017807 ,  0.48564221155 ,  0.570135494531]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
k_point_sampling = MonkhorstPackGrid(
    na=10,
    nb=10,
    nc=10,
    )
numerical_accuracy_parameters = NumericalAccuracyParameters(
    density_mesh_cutoff=105.0*Hartree,
    k_point_sampling=k_point_sampling,
    occupation_method=FermiDirac(100.0*Kelvin*boltzmann_constant),
    )

iteration_control_parameters = IterationControlParameters(
    tolerance=1e-05,
    max_steps=1000,
    )

calculator = LCAOCalculator(
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    iteration_control_parameters=iteration_control_parameters,
    )

bulk_configuration.setCalculator(calculator)
nlprint(bulk_configuration)
bulk_configuration.update()
nlsave(filename, bulk_configuration)

# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
constraints = [SpaceGroupConstraint()]

bulk_configuration = OptimizeGeometry(
    bulk_configuration,
    max_forces=0.01*eV/Ang,
    max_stress=0.05*GPa,
    max_steps=2000,
    max_step_length=0.2*Ang,
    constraints=constraints,
    trajectory_filename=None,
    optimizer_method=LBFGS(),
)
nlsave(filename, bulk_configuration)
nlprint(bulk_configuration)

# -------------------------------------------------------------
# Optical Spectrum
# -------------------------------------------------------------
kpoint_grid = MonkhorstPackGrid(
    na=25,
    nb=25,
    nc=25,
    )

optical_spectrum = OpticalSpectrum(
    configuration=bulk_configuration,
    kpoints=kpoint_grid,
    energies=numpy.linspace(0, 0, 1)*eV,
    broadening=0.1*eV,
    bands_below_fermi_level=1000,
    bands_above_fermi_level=1000,
    )
nlsave(filename, optical_spectrum)

# -------------------------------------------------------------
# Born Effective Charge
# -------------------------------------------------------------
born_effective_charge = BornEffectiveCharge(
    configuration=bulk_configuration,
    kpoints_a=MonkhorstPackGrid(30, 10, 10),
    kpoints_b=MonkhorstPackGrid(10, 30, 10),
    kpoints_c=MonkhorstPackGrid(10, 10, 30),
    atomic_displacement=0.01*Angstrom,
    )
nlsave(filename, born_effective_charge)

# -------------------------------------------------------------
# Dynamical Matrix
# -------------------------------------------------------------
polar_phonon_splitting_parameters = PolarPhononSplittingParameters(
    optical_spectrum=optical_spectrum, born_effective_charge=born_effective_charge)
dynamical_matrix = DynamicalMatrix(
    bulk_configuration,
    filename=filename,
    object_id='dynamical_matrix',
    repetitions=(5, 5, 5),
    atomic_displacement=0.01*Angstrom,
    acoustic_sum_rule=True,
    finite_difference_method=Central,
    force_tolerance=1e-08*Hartree/Bohr**2,
    processes_per_displacement=1,
    log_filename_prefix='forces_displacement_',
    use_wigner_seitz_scheme=False,
    polar_phonon_splitting_parameters=polar_phonon_splitting_parameters,
    )
dynamical_matrix.update()

# -------------------------------------------------------------
# Dielectric Tensor
# -------------------------------------------------------------
dielectric_tensor = DielectricTensor(
    configuration=bulk_configuration,
    dynamical_matrix=dynamical_matrix,
    optical_spectrum=optical_spectrum,
    born_effective_charge=born_effective_charge,
)
nlsave(filename, dielectric_tensor)

# -------------------------------------------------------------
# Susceptibility Derivatives
# -------------------------------------------------------------
susceptibility_derivatives = SusceptibilityDerivatives(
    bulk_configuration,
    filename=filename,
    object_id='susceptibility_derivatives',
    atomic_displacement=0.01*Angstrom,
    finite_difference_method=Central,
    broadening=0.1*eV,
    bands_below_fermi_level=1000,
    bands_above_fermi_level=1000,
    processes_per_displacement=1,
    log_filename_prefix='susceptibility_displacement_',
)
susceptibility_derivatives.update()

# -------------------------------------------------------------
# Raman Spectrum
# -------------------------------------------------------------
raman_spectrum = RamanSpectrum(
    bulk_configuration,
    dynamical_matrix,
    susceptibility_derivatives,
    qpoint=[0.0, 0.0, 0.0],
    phonon_modes=None,
    method=PolarizationDependent,
    polarization_in=[1, 0, 0],
    polarization_out=[1, 0, 0],
    broadening=0.25 * meV,
    )
nlsave(filename, raman_spectrum)

# -------------------------------------------------------------
# Electro Optical Tensor
# -------------------------------------------------------------
electro_optical_tensor = ElectroOpticalTensor(
    configuration=bulk_configuration,
    dielectric_tensor=dielectric_tensor,
    raman_spectrum=raman_spectrum,
    second_harmonics_generation_susceptibility=None,
)
nlsave(filename, electro_optical_tensor)
nlprint(electro_optical_tensor)

electro_optical_tensor.py

It is important to note that this example is only intended to give an overview of the capabilities of ElectroOpticalTensor; A typical output from the nlprint command looks like this:

+------------------------------------------------------------------------------+
|                                                                              |
| Dielectric Tensor Analysis                                                   |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Raman Spectrum Analysis                                                      |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| Electro-optical Tensor Analysis                                              |
|                                                                              |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
| Electro-Optical Tensor Report                                                |
| In units of [pm/V]:                                                          |
+------------------------------------------------------------------------------+
|                                                                              |
| Total                                                                        |
|              x              y              z                                 |
| xx        0.00000        0.00000        5.43361                              |
| yy        0.00000        0.00000        5.43361                              |
| zz        0.00000        0.00000        8.79489                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
|                                                                              |
| Electronic                                                                   |
|              x              y              z                                 |
| xx        0.00000        0.00000        0.00000                              |
| yy        0.00000        0.00000        0.00000                              |
| zz        0.00000        0.00000        0.00000                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
|                                                                              |
| Ionic                                                                        |
|              x              y              z                                 |
| xx        0.00000        0.00000        5.43361                              |
| yy        0.00000        0.00000        5.43361                              |
| zz        0.00000        0.00000        8.79489                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
|                                                                              |
+------------------------------------------------------------------------------+
| Ionic Electro-optical tensor in units of [pm/V]:                             |
|                                                                              |
| Ionic part for mode 4, wavenumber: 165.0261 cm^-1                            |
|              x              y              z                                 |
| xx        0.00000        0.00000        1.28989                              |
| yy        0.00000        0.00000        1.28989                              |
| zz        0.00000        0.00000        1.75727                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
|                                                                              |
| Ionic part for mode 7, wavenumber: 252.5027 cm^-1                            |
|              x              y              z                                 |
| xx        0.00000        0.00000        3.35205                              |
| yy        0.00000        0.00000        3.35205                              |
| zz        0.00000        0.00000        5.77609                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
|                                                                              |
| Ionic part for mode 14, wavenumber: 657.9398 cm^-1                           |
|              x              y              z                                 |
| xx        0.00000        0.00000        0.79166                              |
| yy        0.00000        0.00000        0.79166                              |
| zz        0.00000        0.00000        1.26153                              |
| yz        0.00000        0.00000        0.00000                              |
| xz        0.00000        0.00000        0.00000                              |
| xy        0.00000        0.00000        0.00000                              |
+------------------------------------------------------------------------------+

It gives the total, electronic and ionic electro-optical tensors, and the ionic resolved in specified mode contributions, in Voigt notation. It is important to check the mode contributions as acoustic modes can give spurious effects numerically.

Depending on the system one could have different calculators for the phonon and electronic properties - i.e. DFT+1/2 for a better band gap and optical properties. One should carefully examine the phonon displacements, band gap and Born effective charges during the analysis.

Furthermore it is possible to also include the SecondHarmonicsGenerationSusceptibility in the Raman spectrum and EO tensor calculations which could be important in polar materials lacking inversion symmetry.