Phonons

class aimstools.phonons.phonons.FHIVibesPhonons(outputdir)[source]

Handles phonopy output from FHI-vibes.

bandpath
dos

Phonon density of states PhononDOS

get_dos(unit='cm$^{-1}$')[source]
get_gamma_point_frequencies(unit='cm$^{-1}$')[source]

Returns Gamma-point frequencies as ndarray.

get_irreducible_representations(symprec=1e-05, degeneracy_tolenace=1e-05)[source]

Determines irreducible representations at Gamma.

Returns:tuple – (space group, [band indicies, representation])
get_spectrum(bandpath=None, unit='cm$^{-1}$')[source]
plot(axes=None, color='#1a1a1a', main=True, unit='cm$^{-1}$', **kwargs)[source]

Plots phonon band structure. Similar syntax as plot().

Example

>>> from aimstools.phonons import FHIVibesPhonons as FVP
>>> phon = FVP("path/to/dir")
>>> phon.plot()
Parameters:
  • axes (matplotlib.axes.Axes) – Axes to draw on, defaults to None.
  • figsize (tuple) – Figure size in inches. Defaults to (5,5).
  • filename (str) – Saves figure to file. Defaults to None.
  • spin (int) – Spin channel, can be “up”, “dn”, 0 or 1. Defaults to 0.
  • bandpath (str) – Band path for plotting of form “GMK,GA”.
  • unit (str) – Energy unit, can be “cm$^{-1}$” or “Thz”. Defaults to “cm$^{-1}$”.
  • show_grid_lines (bool) – Show grid lines for axes ticks. Defaults to True.
  • grid_lines_axes (str) – Show grid lines for given axes. Defaults to “x”.
  • grid_linestyle (tuple) – Grid lines linestyle. Defaults to (0, (1, 1)).
  • grid_linewidth (float) – Width of grid lines. Defaults to 1.0.
  • grid_linecolor (str) – Grid lines color. Defaults to mutedblack.
  • show_jumps (bool) – Show jumps between Brillouin zone sections by darker vertical lines. Defaults to True.
  • jumps_linewidth (float) – Width of jump lines. Defaults to mpllinewidth.
  • jumps_linestyle (str) – Line style of the jump lines. Defaults to “-“.
  • jumps_linecolor (str) – Color of the jump lines. Defaults to mutedblack.
  • show_bandstructure (bool) – Show band structure lines. Defaults to True.
  • bands_color (bool) – Color of the band structure lines. Synonymous with color. Defaults to mutedblack.
  • bands_linewidth (float) – Line width of band structure lines. Synonymous with linewidth. Defaults to mpllinewidth.
  • bands_linestyle (str) – Band structure lines linestyle. Synonymous with linestyle. Defaults to “-“.
  • bands_alpha (float) – Band structure lines alpha channel. Synonymous with alpha. Defaults to 1.0.
  • y_tick_locator (float) – Places ticks on energy axis on regular intervals. Defaults to 100 cm^(-1).
  • show_acoustic_bands (bool) – Highlighs accoustic bands. Defaults to True.
  • acoustic_bands_color (str) – Color of the accoustic bands.
Returns:

axes – Axes object.

plot_dos(axes=None, color='#1a1a1a', main=True, unit='cm$^{-1}$', **kwargs)[source]

Plots phonon density of states. Similar syntax as plot().

Example

>>> from aimstools.phonons import FHIVibesPhonons as FVP
>>> phon = FVP("path/to/dir")
>>> phon.plot_dos()
Returns:axes – Axes object.
read_bands()[source]
read_dos()[source]
read_thermal_properties(unit='per mol')[source]

Reads data from thermal_properties.yaml .

Regarding units, see: https://gitlab.com/vibes-developers/vibes/-/issues/41

Parameters:unit (str) – Either “per atom” or “per mol”. “per atom” leaves the unit as given out by phonopy, “per mol” divides by the formula count.

Note

The unit systems of free energy, heat capacity, and entropy are kJ/mol, J/K/mol, and J/K/mol, respectively, where 1 mol means Na× your input unit cell (not formula unit), i.e. you have to divide the value by number of formula unit in your unit cell by yourself. For example, in MgO (conventional) unit cell, if you want to compare with experimental results in kJ/mol, you have to divide the phonopy output by four.

set_bandpath(bandpathstring)[source]
set_dos_spectrum(unit='cm$^{-1}$')[source]
set_spectrum(bandpath=None, unit='cm$^{-1}$')[source]
spectrum

Phonon spectrum PhononSpectrum