.. _compute-thermal: Compute Phonon Linewidth and Thermal Conductivity ================================================= With the irreducible derivatives at second and third order computed with the methods described in the chapter :ref:`compute-id`, we can predict the phonon linewidth and thermal conductivity using perturbation theory. Phonon Linewidth ---------------- Here we continue the NaCl example from :ref:`compute-id`. First, we need to prepare a configuration file ``config.yml`` for the ``pm-conductivity`` command: .. code-block:: yaml :caption: config.yml structure: structure.yml load_fi2: fi_order2.hdf5 load_fi3: fi_order3.hdf5 mesh: [11, 11, 11] band: - ['0 0 0', '1/2 1/2 0'] - ['-1/2 1/2 0', '0 0 0'] - ['0 0 0', '1/2 1/2 1/2'] band_label: - $\Gamma$ - X - $\Gamma$ - L where: * ``structure.yml`` contains structure of NaCl; * ``fi_order2.hdf5`` is the HDF5 data file for the FourierInterpolation class at second order; * ``fi_order3.hdf5`` is the HDF5 data file for the FourierInterpolation class at third order. In this example, we use the FourierInterpolation object of a :math:`4\hat{\mathbf{1}}` FTG (:math:`4 \times 4 \times 4`) at second order and the FourierInterpolation object of a :math:`2\hat{\mathbf{1}}` FTG (:math:`2 \times 2 \times 2`) at third order. We interpolate the phonons and phonon interactions to the mesh of :math:`11\hat{\mathbf{1}}` (:math:`11 \times 11 \times 11`), and compute the linewidth along the K-path :math:`\Gamma \to X \to \Gamma \to L`. Execute the following command the compute the phonon linewidth:: pm-conductivity --config config.yml --save-gamma Thermal Conductivity -------------------- Using the same NaCl example, we can prepare a configuration file ``config.yml`` similar to the one above: .. code-block:: yaml :caption: config.yml structure: structure.yml load_fi2: fi_order2.hdf5 load_fi3: fi_order3.hdf5 mesh: [11, 11, 11] Execute the following command the compute the thermal conductivity using relaxation time approximation (RTA):: pm-conductivity --config config.yml --save-kappa --mode RTA