class matlantis_features.features.phonon.band.PostPhononBandFeatureResult(kpts: ndarray, coords: ndarray, special_kpt_indices: ndarray, labels: List[str], frequency: ndarray, unit: str, unit_cell_atoms: MatlantisAtoms)#

Bases: object

A dataclass for result of PostPhononBandFeature.

Methods

__init__(kpts, coords, special_kpt_indices, …)

plot([plt_name])

Plots the phonon band structure.

to_dataframe([csv_name])

Converts the phonon band structure to pandas.DataFrame.

visual_k_path([show_reciprocal_basis, …])

To visualize the k point path in the 3D plot of the first brillouin zone.

__init__(kpts: ndarray, coords: ndarray, special_kpt_indices: ndarray, labels: List[str], frequency: ndarray, unit: str, unit_cell_atoms: MatlantisAtoms) None#
plot(plt_name: Optional[str] = None) Figure#

Plots the phonon band structure.

Parameters

plt_name (str or None, optional) – The file name to which the plot of the phonon
band structure will be saved. Supported formats include ‘png’ ‘jpg’ ‘jpeg’
‘webp’ ‘svg’ and ‘pdf’. If ‘None’ is provided, the figure will not be saved.
Defaults to None.

Returns

The plot of the phonon band structure as a plotly.graph_objects.Figure instance.

Return type

go.Figure

to_dataframe(csv_name: Optional[str] = None) DataFrame#

Converts the phonon band structure to pandas.DataFrame.

Parameters

csv_name (str or None, optional) – The csv file path to which the dataframe will be
saved. If ‘None’ is provided, the dataframe will not be saved. Defaults to None.

Returns

The pandas.DataFrame which contains the coordinates of the band path, the labels
of special points and the phonon vibration frequencies.

Return type

pd.DataFrame

visual_k_path(show_reciprocal_basis: bool = False, show_special_k_points: bool = True, marker_size: int = 2) Figure#

To visualize the k point path in the 3D plot of the first brillouin zone.

Parameters
  • show_reciprocal_basis (bool, optional) – Show the basis vector of the reciprocal cell or not. Defaults to False.

  • show_special_k_points (bool, optional) – Show the special k points or not. Defaults to True.

  • marker_size (int, optional) – The marker size of the k points. Defaults to 2.

Returns

The 3D plot of the k point path.

Return type

go.Figure

Attributes

dict#

Dictionary representation of the PostPhononBandFeatureResult.

Returns

Phonon band structure in dictionary format.

Return type

dict[str, Any]

kpts: ndarray#
coords: ndarray#
special_kpt_indices: ndarray#
labels: List[str]#
frequency: ndarray#
unit: str#
unit_cell_atoms: MatlantisAtoms#