Plotting helper cij.plot

class cij.plot.ModePlotter(calculator)

Bases: object

The plotter for plotting interpolated phonon mode frequency and its derivatives (Gruneisen parameters, etc.) for checking the status of mode-frequency interpolation

add_pressure_ticks(ax, interval=1.0, label=None)
plot_modes(ax, n=0, iq=0)

Plotting the phonon modes and its derivatives

Parameters
  • ax (Axes) –

  • n (int) – the order of derivatives to be plotted: \(n = 0\) for \(\omega_{qm}(V)\), \(n = 1\) for \(\gamma_{qm}(V)\), \(n = 2\) for \(V\frac{\partial\gamma_{qm}(V)}{\partial V}\)

  • iq (int) – the index of \(q\) point to be plotted

property qha_input
property v_array
property volumes
class cij.plot.Plotter(calculator)

Bases: object

The plotter for QHA’s calculator

index_p(p)
index_t(t)
property p_indices
plot_cij_p(ax, cij_key, t, *argv, **kwargs)
plot_cij_p_with(handler, cij_key, t)
plot_cij_t_with(handler, cij_key, p)
cij.plot.color_x(vmin, vmax, cmap=None)

Generate a map from \(x\) to color

Parameters
  • vmin (float) – the lower bound of the color map

  • vmax (float) – the upper bound of the color map

Return type

Callable[[float], tuple]

Returns

the function \(C(x)\) that accepts \(x\) and returns color \(C\)

Checking mode interpolation results

class cij.plot.modes.ModePlotter(calculator)

Bases: object

The plotter for plotting interpolated phonon mode frequency and its derivatives (Gruneisen parameters, etc.) for checking the status of mode-frequency interpolation

add_pressure_ticks(ax, interval=1.0, label=None)
plot_modes(ax, n=0, iq=0)

Plotting the phonon modes and its derivatives

Parameters
  • ax (Axes) –

  • n (int) – the order of derivatives to be plotted: \(n = 0\) for \(\omega_{qm}(V)\), \(n = 1\) for \(\gamma_{qm}(V)\), \(n = 2\) for \(V\frac{\partial\gamma_{qm}(V)}{\partial V}\)

  • iq (int) – the index of \(q\) point to be plotted

property qha_input
property v_array
property volumes

Plotting task dependencies

Plotting the phonon contribution calculation tasks dependencies to a nice arrow plot. The underlying functionalities are provided by NetworkX.

cij.plot.tasks.make_legend(ax=None, node_color=['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'])

Create legends for phonon contribution calculation task dependencies plot.

Parameters
  • ax (Optional[Axes]) – the axes to plot on

  • node_color (list) –

    the list of 4 colors for 4 types of phonon modulus calculation tasks:

    • \(c_{iiii}\) (longitudinal)

    • \(c_{iijj}\) (off-diagonal)

    • \(c_{ijij}\) (shear)

    • \(c_{ijkl}\) (shear)

cij.plot.tasks.plot_phonon_contribution_dependencies(calculator, **kwargs)

Plotting phonon contribution calculation task dependencies

Parameters
cij.plot.tasks.plot_tasklist_dependencies(task_list, **kwargs)

Plotting phonon contribution calculation task dependencies in a given task list

Parameters