matcalc._phonon3 module

Calculator for phonon-phonon interaction and related properties.

class Phonon3Calc(calculator: Calculator | str, *, fc2_supercell: ArrayLike = ((2, 0, 0), (0, 2, 0), (0, 0, 2)), fc3_supercell: ArrayLike = ((2, 0, 0), (0, 2, 0), (0, 0, 2)), mesh_numbers: ArrayLike = (20, 20, 20), disp_kwargs: dict[str, Any] | None = None, thermal_conductivity_kwargs: dict | None = None, relax_structure: bool = True, relax_calc_kwargs: dict | None = None, fmax: float = 0.1, optimizer: str = 'FIRE', t_min: float = 0, t_max: float = 1000, t_step: float = 10, write_phonon3: bool | str | Path = False, write_kappa: bool = False)[source]

Bases: PropCalc

Class for calculating thermal conductivity using third-order force constants.

This class integrates with the Phono3py library to compute thermal conductivity based on third-order force constants (FC3). It includes capabilities for optional structure relaxation, displacement generation, and force calculations on supercells. Results include the thermal conductivity as a function of temperature and other intermediate configurations used in the calculation.

Variables:
  • calculator – Calculator used to compute forces for the atomic structure.

  • fc2_supercell – Transformation matrix defining the supercell for second-order force constants.

  • fc3_supercell – Transformation matrix defining the supercell for third-order force constants.

  • mesh_numbers – Mesh grid dimensions for phonon calculations.

  • disp_kwargs – Keyword arguments for displacement generation.

  • thermal_conductivity_kwargs – Keyword arguments for thermal conductivity calculations.

  • relax_structure – Flag indicating if the structure needs to be relaxed before calculations.

  • relax_calc_kwargs – Additional arguments for the relaxation calculator.

  • fmax – Maximum force criterion for structure relaxation.

  • optimizer – Optimizer name for structure relaxation.

  • t_min – Minimum temperature for thermal conductivity calculations.

  • t_max – Maximum temperature for thermal conductivity calculations.

  • t_step – Step size for temperature in thermal conductivity calculations.

  • write_phonon3 – Path or flag for saving the Phono3py output object.

  • write_kappa – Flag indicating if the thermal conductivity results should be written to file.

Initializes the class for thermal conductivity calculation and structure relaxation utilizing third-order force constants (fc3). The class provides configurable parameters for the relaxation process, supercell settings, thermal conductivity calculation, and file output management.

Parameters:
  • calculator – The calculator instance or string indicating the method to be used for energy and force calculations.

  • fc2_supercell – The supercell matrix for generating second-order force constants.

  • fc3_supercell – The supercell matrix for generating third-order force constants.

  • mesh_numbers – The grid size for reciprocal space mesh used in phonon calculations.

  • disp_kwargs – Dictionary containing optional parameters for displacement generation in force constant calculation.

  • thermal_conductivity_kwargs – Dictionary containing optional parameters for thermal conductivity calculation.

  • relax_structure – Boolean flag to enable or disable structure relaxation before force constant calculations.

  • relax_calc_kwargs – Dictionary containing additional configuration options for the relaxation calculation.

  • fmax – The maximum force allowed on atoms during the structure relaxation procedure. Determines the relaxation termination condition.

  • optimizer – The optimizer algorithm to use for structure relaxation. Defaults to “FIRE.”

  • t_min – The minimum temperature (in Kelvin) for thermal conductivity calculations.

  • t_max – The maximum temperature (in Kelvin) for thermal conductivity calculations.

  • t_step – The temperature step size for thermal conductivity calculations.

  • write_phonon3 – Specifies the filename or a boolean flag for writing the third-order force constants to a file. If True, writes to “phonon3.yaml” by default.

  • write_kappa – Boolean flag to enable or disable saving thermal conductivity results to a file.

_abc_impl = <_abc._abc_data object>[source]
calc(structure: Structure | dict[str, Any]) dict[source]

Performs thermal conductivity calculations using the Phono3py library.

This method processes a given atomic structure and calculates its thermal conductivity through third-order force constants (FC3) computations. The process involves optional relaxation of the input structure, generation of displacements, and force calculations corresponding to the supercell structures. The results include computed thermal conductivity over specified temperatures, along with intermediate Phono3py configurations.

Parameters:

structure – The atomic structure to compute thermal conductivity for. This can be provided as either a Structure object or a dictionary describing the structure as per specifications of the input format.

Returns:

A dictionary containing the following keys: - “phonon3”: The configured and processed Phono3py object containing data

regarding the phonon interactions and force constants.

  • ”temperatures”: A numpy array of temperatures over which thermal conductivity has been computed.

  • ”thermal_conductivity”: The averaged thermal conductivity values computed at the specified temperatures. Returns NaN if the values cannot be computed.