phonon_band

py4vasp.calculation.phonon_band
class py4vasp.calculation._phonon_band.PhononBand(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.

plot(*args, **kwargs)

Wrapper around the to_graph() function.

This will merge multiple graphs if you specify different sources with the selection arguments. All arguments are passed to the wrapped function.

print()

Print a string representation of this instance.

read(*args, **kwargs)

Convenient wrapper around to_dict. Check that function for examples and optional arguments.

selections()

Return a dictionary specifying which atoms and directions can be used as selection.

to_csv(*args, filename=None, **kwargs)

Converts 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() function. Please check the documentation of that function to learn which arguments are allowed.

Parameters:

filename (str | Path) – Name of the csv file which the data is exported to.

to_dict()

Read the phonon band structure into a dictionary.

Returns:

Contains the q-point path for plotting phonon band structures and the phonon bands. In addition the phonon modes are returned.

Return type:

dict

to_frame(*args, **kwargs)

Wrapper around the to_frame() function.

Generates dataframes from the graph object. For information about parameters that can be passed to this method, look at to_graph().

Returns:

Pandas dataframe corresponding to data in the graph

Return type:

Dataframe

to_graph(selection=None, width=1.0)

Generate a graph of the phonon bands.

Parameters:
  • selection (str) –

    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) – Specifies the width illustrating the projections.

Returns:

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.

Return type:

Graph

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() function. Please check the documentation of that function to learn which arguments are allowed.

to_plotly(*args, **kwargs)

Convert the graph of this quantity to a plotly figure.

The arguments to this function are automatically passed on to the to_graph() function. Please check the documentation of that function to learn which arguments are allowed.