PAOFLOW.phonon.do_phonopy#

phonopy driver entry points for PAOFLOW.

Builds and drives the phonopy.Phonopy object: structure conversion and object creation (Stage 0), then the finite-displacement harmonic workflow (Stage 1) – displacement generation, second-order force constants and the derived dispersion, density of states and thermal properties.

Attributes#

Functions#

init_phonopy(data_controller)

Create a phonopy.Phonopy object and store it on the controller.

generate_displacements(data_controller)

Generate symmetry-reduced finite displacements on the phonopy object.

produce_force_constants(data_controller[, forces])

Produce the second-order force constants (fc2) from the force sets.

attach_nac(data_controller[, born, dielectric, ...])

Attach non-analytical correction (NAC) parameters to the phonopy object.

default_q_path(data_controller)

Derive a high-symmetry q-path (phonopy format) from the QE ibrav.

compute_phonon_bands(data_controller[, q_path, ...])

Compute the phonon dispersion and write <fname>_band.dat.

compute_phonon_dos(data_controller[, mesh, sigma, ...])

Compute the total phonon DOS and write <fname>_dos.dat.

compute_thermal_properties(data_controller[, mesh, ...])

Compute harmonic thermal properties and write <fname>_thermal.dat.

Module Contents#

PAOFLOW.phonon.do_phonopy.THZ_TO_CM1 = 33.35641[source]#
PAOFLOW.phonon.do_phonopy.init_phonopy(data_controller)[source]#

Create a phonopy.Phonopy object and store it on the controller.

Reads from DataController#

Structure: alat, a_vectors, tau, atoms (via paoflow_to_phonopy()). Configuration: phonon_supercell_matrix (required), phonon_primitive_matrix (optional), phonon_displacement_distance (optional).

Writes to DataController#

phonopy : the phonopy.Phonopy instance handle.

returns:

The initialised object (also stored under arry['phonopy']).

rtype:

phonopy.Phonopy

PAOFLOW.phonon.do_phonopy.generate_displacements(data_controller)[source]#

Generate symmetry-reduced finite displacements on the phonopy object.

Reads phonon_displacement_distance (Bohr) from the controller and populates phonon.supercells_with_displacements.

PAOFLOW.phonon.do_phonopy.produce_force_constants(data_controller, forces=None)[source]#

Produce the second-order force constants (fc2) from the force sets.

forces may be supplied explicitly (array (ndisp, natoms, 3) in Ry/au); otherwise the forces/dataset already attached to the phonopy object (via PAOFLOW.phonon.io) are used.

PAOFLOW.phonon.do_phonopy.attach_nac(data_controller, born=None, dielectric=None, born_file=None, factor=None)[source]#

Attach non-analytical correction (NAC) parameters to the phonopy object.

Enables LO-TO splitting near \(\Gamma\) by setting phonon.nac_params. Once attached, phonopy applies the correction automatically to the dispersion, DOS and thermal properties.

Parameters:
  • born (array_like, optional) – Born effective charges (natom_prim, 3, 3) in units of the elementary charge. Required (with dielectric) unless born_file is given.

  • dielectric (array_like, optional) – (3, 3) high-frequency dielectric tensor.

  • born_file (str, optional) – Path to a phonopy BORN file; when supplied it takes precedence and provides born, dielectric and the unit-conversion factor.

  • factor (float, optional) – NAC unit-conversion factor. Defaults to the phonopy Quantum ESPRESSO value when building nac_params from explicit arrays.

Returns:

The nac_params dictionary that was attached.

Return type:

dict

PAOFLOW.phonon.do_phonopy.default_q_path(data_controller)[source]#

Derive a high-symmetry q-path (phonopy format) from the QE ibrav.

Returns (band_paths, labels) or (None, None) when no ibrav-based path is available (ibrav unset/0 or an unsupported lattice).

PAOFLOW.phonon.do_phonopy.compute_phonon_bands(data_controller, q_path=None, q_labels=None, npoints=101, units='THz', fname='phonon')[source]#

Compute the phonon dispersion and write <fname>_band.dat.

When q_path is None a high-symmetry path is derived from the QE ibrav (see default_q_path()); if that is unavailable the path is generated automatically via seekpath. Otherwise q_path is a sequence of path segments in fractional reciprocal coordinates.

Writes <fname>_band.dat (distance + branch frequencies) and, when tick labels are available, <fname>_band.labels (tick distance + label).

PAOFLOW.phonon.do_phonopy.compute_phonon_dos(data_controller, mesh=None, sigma=None, units='THz', fname='phonon')[source]#

Compute the total phonon DOS and write <fname>_dos.dat.

PAOFLOW.phonon.do_phonopy.compute_thermal_properties(data_controller, mesh=None, t_min=0.0, t_max=1000.0, t_step=10.0, fname='phonon')[source]#

Compute harmonic thermal properties and write <fname>_thermal.dat.

Columns: temperature (K), Helmholtz free energy (kJ/mol), entropy (J/K/mol), constant-volume heat capacity (J/K/mol).