magnopy.experimental.plot_spinham#

magnopy.experimental.plot_spinham(spinham: SpinHamiltonian, distance_digits=5, plot_dmi=True, dmi_vectors_scale=1, _sphinx_gallery_fix=False)[source]#

Visualizes spin Hamiltonian.

Warning

Experimental feature. Only 1, 21, 22 parameters are implemented.

Added in version 0.2.0.

Parameters:
spinhamSpinHamiltonian

Spin Hamiltonian

distance_digitsint, default 5

Precision for comparing two linear distances.

plot_dmibool, default True

Whether to plot DMI vectors

dmi_scalefloat, default 1.0

Scale for the maximum dmi vector length.

Returns:
pe1PlotlyEngine

Instance of the Magnopy's plot engine, with plotted spin Hamiltonian. Ready to be saved or showed. Only on-site parameters are plotted

pe2PlotlyEngine

Instance of the Magnopy's plot engine, with plotted spin Hamiltonian. Ready to be saved or showed. Only two-spins/two-sites parameters are plotted.

Notes

Use as follows:

pe1, pe2 = plot_spinham(spinham)

# Show
pe1.show(width=1000, height=1000, axes_visible=False)
pe2.show(width=1000, height=1000, axes_visible=False)

# If by some reason a window in a browser does not open automatically,
# save the figures and open them manually
pe1.save("spinham_1.html", axes_visible=False)
pe2.save("spinham_2.html", axes_visible=False)

pe1 displays the magnopy.SpinHamiltonian.p1 and magnopy.SpinHamiltonian.p21 parameters - ( 1 ) terms and (2, 1) terms.

pe2 displays the magnopy.SpinHamiltonian.p22 parameters - (2, 2) terms.

Hover over the magnetic sites (pe1) or bonds (pe2) to see the values and more details on the parameters.