Phonons API Reference

Building the phonons object is the intermediate step between finishing your Finite Difference object, and initializing the Conductivity object.

Attributes

class kaldo.phonons.Phonons(**kwargs)[source]

The Phonons object exposes all the phononic properties of a system. It’s can be fed into a Conductivity object and must be built with a ForceConstant object.

Parameters:
  • forceconstants (ForceConstants) – contains all the information about the system and the derivatives of the potential.

  • is_classic (bool) – specifies if the system is classic, True or quantum, False Default is False

  • kpts – defines the number of k points to use to create the k mesh Default is (1, 1, 1)

  • temperature (float) – defines the temperature of the simulation. Units: K.

  • min_frequency (float, optional) – ignores all phonons with frequency below min_frequency THz, Default is None

  • max_frequency (float, optional) – ignores all phonons with frequency above max_frequency THz Default is None

  • third_bandwidth (float, optional) – Defines the width of the energy conservation smearing in the phonons scattering calculation. If None the width is calculated dynamically. Otherwise the input value corresponds to the width. Units: THz.

  • broadening_shape (string, optional) – Defines the algorithm to use for the broadening of the conservation of the energy for third irder interactions. Available broadenings are gauss, lorentz and triangle. Default is gauss.

  • folder (string, optional) – Specifies where to store the data files. Default is output.

  • storage (default, formatted, numpy, memory, hdf5, optional) – Defines the storing strategy used to store the observables. The default strategy stores formatted output and numpy arrays. memory storage doesn’t generate any output.

  • grid_type ('F' or 'C, optional) – Specify if to use ‘C” style atoms replica grid of fortran style ‘F’, Default ‘C’

  • is_balanced (Enforce detailed balance when calculating anharmonic properties,) – Default: False

Return type:

Phonons Object

Attributes:
bandwidth

Calculate the phonons bandwidth, the inverse of the lifetime, for each k point in k_points and each mode.

eigenvalues

Calculates the eigenvalues of the dynamical matrix in Thz^2.

eigenvectors

Calculates the eigenvectors of the dynamical matrix.

frequency

Calculate phonons frequency

heat_capacity

Calculate the heat capacity for each k point in k_points and each mode.

heat_capacity_2d

Calculate the generalized 2d heat capacity for each k point in k_points and each mode.

omega

Calculates the angular frequencies from the diagonalized dynamical matrix.

participation_ratio

Calculates the participation ratio of each normal mode.

phase_space

Calculate the 3-phonons-processes phase_space, for each k point in k_points and each mode.

physical_mode

Calculate physical modes.

population

Calculate the phonons population for each k point in k_points and each mode.

velocity

Calculates the velocity using Hellmann-Feynman theorem.

property bandwidth

Calculate the phonons bandwidth, the inverse of the lifetime, for each k point in k_points and each mode.

Returns:

bandwidth – bandwidth for each k point and each mode

Return type:

np.array(n_k_points, n_modes)

property eigenvalues

Calculates the eigenvalues of the dynamical matrix in Thz^2.

Returns:

eigenvalues – (n_phonons) Eigenvalues of the dynamical matrix

Return type:

np array

property eigenvectors

Calculates the eigenvectors of the dynamical matrix.

Returns:

eigenvectors – (n_phonons, n_phonons) Eigenvectors of the dynamical matrix

Return type:

np array

property frequency

Calculate phonons frequency :returns: frequency – (n_k_points, n_modes) frequency in THz :rtype: np array

property heat_capacity

Calculate the heat capacity for each k point in k_points and each mode. If classical, it returns the Boltzmann constant in J/K. If quantum it returns the derivative of the Bose-Einstein weighted by each phonons energy. .. math:

c_\mu = k_B \frac{\nu_\mu^2}{ \tilde T^2} n_\mu (n_\mu + 1)

where the frequency \nu and the temperature \tilde T are in THz.

Returns:

c_v – heat capacity in J/K for each k point and each mode

Return type:

np.array(n_k_points, n_modes)

property heat_capacity_2d

Calculate the generalized 2d heat capacity for each k point in k_points and each mode. If classical, it returns the Boltzmann constant in W/m/K.

Returns:

heat_capacity_2d – heat capacity in W/m/K for each k point and each modes couple.

Return type:

np.array(n_k_points, n_modes, n_modes)

property omega

Calculates the angular frequencies from the diagonalized dynamical matrix.

Returns:

frequency – (n_k_points, n_modes) frequency in rad

Return type:

np array

property participation_ratio

Calculates the participation ratio of each normal mode. Participation ratio’s represent the fraction of atoms that are displaced meaning a value of 1 corresponds to translation. Defined by equations in DOI: 10.1103/PhysRevB.53.11469 :returns: participation_ratio – (n_k_points, n_modes) atomic participation :rtype: np array

property phase_space

Calculate the 3-phonons-processes phase_space, for each k point in k_points and each mode.

Returns:

phase_space – phase_space for each k point and each mode

Return type:

np.array(n_k_points, n_modes)

property physical_mode

Calculate physical modes. Non physical modes are the first 3 modes of q=(0, 0, 0) and, if defined, all the modes outside the frequency range min_frequency and max_frequency. :returns: physical_mode – (n_k_points, n_modes) bool :rtype: np array

property population

Calculate the phonons population for each k point in k_points and each mode. If classical, it returns the temperature divided by each frequency, using equipartition theorem. If quantum it returns the Bose-Einstein distribution

Returns:

population – population for each k point and each mode

Return type:

np.array(n_k_points, n_modes)

property velocity

Calculates the velocity using Hellmann-Feynman theorem.

Returns:

velocity – (n_k_points, n_unit_cell * 3, 3) velocity in 100m/s or A/ps

Return type:

np array