perturbopy.postproc.calc_modes.spins.Spins
- class perturbopy.postproc.calc_modes.spins.Spins(pert_dict)
Bases:
CalcModeClass representation of a Perturbo spins calculation.
- Parameters:
pert_dict (dict)
calculation. (Dictionary containing the inputs and outputs from the spins)
Methods
Class method to create a CalcMode object from the YAML file generated by a Perturbo calculation.
Method to plot the <n|sigma_z|n> values over the band structure.
- classmethod from_yaml(yaml_path='pert_output.yml')
Class method to create a CalcMode object from the YAML file generated by a Perturbo calculation.
- Parameters:
yaml_path (str, optional) – Path to the YAML file generated by a Perturbo calculation
- Returns:
calc_mode – The CalcMode object generated from the YAML file
- Return type:
- plot_spins(ax, kpoint_idx=0, show_kpoint_labels=True, log=True, **kwargs)
Method to plot the <n|sigma_z|n> values over the band structure.
- Parameters:
ax (matplotlib.axes.Axes) – Axis on which to plot the bands.
kpoint_idx (int, optional) – Index of the k-point to plot the <n|sigma_z|n> values for. <n|sigma_z|n> elements will be plotted along k-points, at this k-point By default, it will be the first k-point.
show_kpoint_labels (bool, optional) – If true, the k-point labels stored in the labels attribute will be shown on the plot. Default true.
log (bool, optional) – If true, the plot will normalize values on a log scale. If false, the plot will normalize values linearly. By default, it will be true.
- Returns:
ax – Axis with the plotted bands.
- Return type:
matplotlib.axes.Axes