aiida_skeaf.utils package#

Submodules#

aiida_skeaf.utils.builder module#

This module contains the builder functions for the calculations.

aiida_skeaf.utils.builder.create_wan2skeaf_builder(params: dict | Dict, inputs: dict | Dict)[source]#

Create a builder for the Wan2SkeafCalculation. :param params: the parameters dictionary :type params: dict, orm.Dict :param inputs: the inputs dictionary :type inputs: dict, orm.Dict :return: the builder :rtype:

aiida_skeaf.utils.plot module#

Functions to plot output results.

aiida_skeaf.utils.plot.complement_color(r, g, b)[source]#

Get complement color.

https://stackoverflow.com/questions/40233986/python-is-there-a-function-or-formula-to-find-the-complementary-colour-of-a-rgb :param r: _description_ :type r: _type_ :param g: _description_ :type g: _type_ :param b: _description_ :type b: _type_

aiida_skeaf.utils.plot.plot_frequency(frequency: ArrayData, x: str = 'phi', y: str = 'freq', *, multiply_cosine: bool = False, **kwargs) None[source]#

Plot SkeafCalculation.outputs.frequency array.

Parameters:
  • frequency (orm.ArrayData) – SkeafCalculation.outputs.frequency

  • x (str, optional) – the array to be used as x data, defaults to “phi”

  • y (str, optional) – the array to be used as y data, defaults to “freq”

  • multiply_cosine – multiply y array with cos(theta), theta from z axis

should be a horizontal line for cylindrical Fermi surface. :type multiply_cosine: bool, optional

aiida_skeaf.utils.plot.plot_frequency_calc(calc: SkeafCalculation, **kwargs) None[source]#

Plot SKEAF output frequency vs angle.

Parameters:

calc (SkeafCalculation) – A finished SkeafCalculation

aiida_skeaf.utils.plot.plot_frequency_workchain(wkchain: SkeafWorkChain, **kwargs) None[source]#

Plot SKEAF output frequency vs angle.

Parameters:

wkchain (SkeafWorkChain) – A finished SkeafWorkChain

aiida_skeaf.utils.plot.plot_xy(x: ndarray, y: ndarray, *, label: str | None = None, xlabel: str | None = None, ylabel: str | None = None, title: str = 'Frequency vs angle', ax: Axes | None = None) None[source]#

Plot raw data.

Parameters:
  • x (np.ndarray) – _description_

  • y (np.ndarray) – _description_

  • label (str, optional) – _description_, defaults to None

  • ax (matplotlib.pyplot.Axes, optional) – If provided reuse this matplotlib axes, defaults to None

aiida_skeaf.utils.str module#

Functions for str.

aiida_skeaf.utils.str.removeprefix(text: str, prefix: str) str[source]#

For python <= 3.8 compatibility.

Parameters:
  • text (str) – _description_

  • prefix (str) – _description_

Returns:

_description_

Return type:

str

aiida_skeaf.utils.str.removesuffix(text: str, suffix: str) str[source]#

For python <= 3.8 compatibility.

Parameters:
  • text (str) – _description_

  • suffix (str) – _description_

Returns:

_description_

Return type:

str

Module contents#

Useful functions for the Skeaf plugin.