class matlantis_features.features.phonon.dos.PostPhononDOSFeatureResult(energy: Dict[str, List[float]], dos: Dict[str, List[float]], unit: str)#

Bases: object

A dataclass for result of PostPhononDOSFeature.

Methods

__init__(energy, dos, unit)

plot([plt_name, reverse_axis])

Plots the phonon density of states (DOS).

to_dataframe([csv_name])

Convert the phonon DOS to pandas.DataFrame.

__init__(energy: Dict[str, List[float]], dos: Dict[str, List[float]], unit: str) None#
plot(plt_name: Optional[str] = None, reverse_axis: bool = False) Figure#

Plots the phonon density of states (DOS).

Parameters
  • plt_name (str or None, optional) – The file name to which the plot of phonon
    DOS 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.

  • reverse_axis (bool, optional) –

    If ‘False’, the x-axis will be ‘energy’ and the y-axis
    will be density of states. If ‘True’, the x-axis and y-axis will be exchanged.

    Defaults to False.

Returns

The plot of phonon DOS as a plotly.graph_objects.Figure instance.

Return type

go.Figure

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

Convert the phonon DOS 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 phonon vibration energy and corresponding
density of states. The element projected DOS will also be saved if the system
contains more than one element.

Return type

pd.DataFrame

Attributes

dict#

Dictionary representation of the PostPhononDOSFeatureResult.

Returns

Phonon DOS in dictionary format.

Return type

dict[str, Any]

energy: Dict[str, List[float]]#
dos: Dict[str, List[float]]#
unit: str#