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:
- spinham
SpinHamiltonian 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.
- spinham
- Returns:
- pe1
PlotlyEngine Instance of the Magnopy's plot engine, with plotted spin Hamiltonian. Ready to be saved or showed. Only on-site parameters are plotted
- pe2
PlotlyEngine 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.
- pe1
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)
pe1displays themagnopy.SpinHamiltonian.p1andmagnopy.SpinHamiltonian.p21parameters - ( 1 ) terms and (2, 1) terms.pe2displays themagnopy.SpinHamiltonian.p22parameters - (2, 2) terms.Hover over the magnetic sites (
pe1) or bonds (pe2) to see the values and more details on the parameters.