perturbopy.postproc.calc_modes.phdisp.Phdisp
- class perturbopy.postproc.calc_modes.phdisp.Phdisp(pert_dict)
Bases:
CalcModeClass representation of a Perturbo phonon dispersion (phdisp) calculation.
- phdisp
Database for the phonon energies computed by the phdisp calculation. The keys are the phonon mode, and the values are an array (of length M) containing the energies at each q-point with units phdisp.units
- Type:
Methods
Class method to create a CalcMode object from the YAML file generated by a Perturbo calculation.
Method to plot the phonon dispersion.
- classmethod from_yaml(yaml_path='pert_output.yml')
Class method to create a CalcMode object from the YAML file generated by a Perturbo calculation.
- Parameters:
yaml_path (str, optional) – Path to the YAML file generated by a Perturbo calculation
- Returns:
calc_mode – The CalcMode object generated from the YAML file
- Return type:
- plot_phdisp(ax, show_qpoint_labels=True, **kwargs)
Method to plot the phonon dispersion.
- Parameters:
ax (matplotlib.axes.Axes) – Axis on which to plot the phonons.
show_qpoint_labels (bool, optional) – If true, the q-point labels stored in the labels attribute will be shown on the plot.
c (str, list) – Color(s) for phonon modes; see corresponding entry in plot_tools.plot_dispersion function
ls (str, list) – Linestyle(s) for phonon modes; see corresponding entry in plot_tools.plot_dispersion function
energy_window (tuple of float, optional) – The range of phonon energies to be shown on the y-axis.
- Returns:
ax – Axis with the plotted phonons.
- Return type:
matplotlib.axes.Axes