phonon.band¶
(
- data_context,
- **kwargs
)
The phonon band structure contains the q-resolved phonon eigenvalues.
The phonon band structure is a graphical representation of the phonons. It illustrates the relationship between the frequency of modes and their corresponding wave vectors in the Brillouin zone. Each line or branch in the band structure represents a specific phonon, and the slope of these branches provides information about their velocity.
The phonon band structure includes the dispersion relations of phonons, which reveal how vibrational frequencies vary with direction in the crystal lattice. The presence of band gaps or band crossings indicates the material’s ability to conduct or insulate heat. Additionally, the branches near the high-symmetry points in the Brillouin zone offer insights into the material’s anharmonicity and thermal conductivity. Furthermore, phonons with imaginary frequencies indicate the presence of a structural instability.
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
dict
Read the phonon band structure into a dictionary.
Returns
dict- Contains the q-point path for plotting phonon band structures and the phonon bands. In addition the phonon modes are returned.
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
(
- selection:
str= None, - width:
float= 1.0
) → Graph
Generate a graph of the phonon bands.
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.
-
- width:
float= 1.0 - Specifies the width illustrating the projections.
Returns
Graph- Contains the phonon band structure for all the q points. If a selection is provided, the width of the bands is adjusted according to the projection.
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.