phonon.dos¶
(
- data_context,
- **kwargs
)
The phonon density of states (DOS) describes the number of modes per energy.
The phonon density of states (DOS) is a representation of the distribution of phonons in a material across different frequencies. It provides a histogram of the number of phonon states per frequency interval. Peaks and features in the DOS reveal the density of vibrational modes at specific frequencies. One can related these properties to study e.g. the heat capacity or the thermal conductivity.
Projecting the phonon density of states (DOS) onto specific atoms highlights the contribution of each atomic species to the vibrational spectrum. This analysis helps to understand the role of individual elements’ impact on the material’s thermal and mechanical properties. The projected phonon DOS can guide towards engineering these properties by substitution of specific atoms. Additionally, the atom-specific projection allows for the identification of localized modes or vibrations associated with specific atomic species.
path
plot
Almost same as the to_graph() function.
All arguments will be passed to to_graph. If the to_graph() would
produce multiple graphs this method will merge them into a single one.
read
selections
to_csv
(
- *args,
- filename:
str | Path= None, - **kwargs
)
Writes the data to a csv file.
Writes out a csv file for data stored in a dataframe generated with
the to_frame() method. Useful for creating external plots
for further analysis.
If no filename is provided a default filename is deduced from the name of the class.
Note that the filename must be a keyword argument, i.e., you explicitly
need to write filename=”name_of_file” because the arguments are passed
on to the to_graph() method. Please check the documentation of that
method to learn which arguments are allowed.
Parameters
- filename:
str | Path= None - Name of the csv file which the data is exported to.
to_dict
str = None) → dict
Read the phonon DOS into a dictionary.
Parameters
- selection:
str= None - A string specifying the projection of the phonon modes onto atoms and directions.
Please specify selections using one of the following:
-
To specify the atom, you can either use its element name (Si, Al, …) or its index as given in the input file (1, 2, …). For the latter option it is also possible to specify ranges (e.g. 1:4).
-
To select a particular direction specify the Cartesian direction (x, y, z).
You separate multiple selections by commas or whitespace and can nest them using parenthesis, e.g. Sr(x) or z(1, 2). The order of the selections does not matter, but it is case sensitive to distinguish y (Cartesian direction) from Y (yttrium). You can also add or subtract different selections e.g. Sr - Ti.
If you are unsure what selections exist, please use the selections routine which will return all possibilities.
-
Returns
dict- Contains the energies at which the phonon DOS was computed. The total DOS is returned and any possible projected DOS selected by the selection argument.
to_frame
Dataframe
Convert data to pandas dataframe.
This will first convert use the to_graph() method to convert to a
Graph. All arguments are passed to that method. The resulting graph is then
converted to a dataframe.
Returns
Dataframe- Pandas dataframe corresponding to data in the graph
to_graph
str = None) → Graph
Generate a graph of the selected DOS.
Parameters
- selection:
str= None - A string specifying the projection of the phonon modes onto atoms and directions.
Please specify selections using one of the following:
-
To specify the atom, you can either use its element name (Si, Al, …) or its index as given in the input file (1, 2, …). For the latter option it is also possible to specify ranges (e.g. 1:4).
-
To select a particular direction specify the Cartesian direction (x, y, z).
You separate multiple selections by commas or whitespace and can nest them using parenthesis, e.g. Sr(x) or z(1, 2). The order of the selections does not matter, but it is case sensitive to distinguish y (Cartesian direction) from Y (yttrium). You can also add or subtract different selections e.g. Sr - Ti.
If you are unsure what selections exist, please use the selections routine which will return all possibilities.
-
Returns
Graph- The graph contains the total DOS. If a selection is given, in addition the projected DOS is shown.
to_image
(
- *args,
- filename = None,
- **kwargs
)
Read the data and generate an image writing to the given filename.
The filetype is automatically deduced from the filename; possible are common raster (png, jpg) and vector (svg, pdf) formats. If no filename is provided a default filename is deduced from the name of the class and the picture has png format.
Note that the filename must be a keyword argument, i.e., you explicitly
need to write filename=”name_of_file” because the arguments are passed
on to the to_graph() method. Please check the documentation of that
method to learn which arguments are allowed.
to_plotly
Produces a graph and convertes it to a plotly figure.
The arguments to this function are passed on to the to_graph() method.
Takes the resulting graph and converts it to a plotly figure.