- Release:
0.4.3
- Date:
9 January 2026
Useful links: Issue Tracker | Cite | User support | Tutorials
Hint
We recommend to install magnopy with optional dependencies (Plotly and matplotlib) whether possible.
pip install "magnopy[visual]"
Then, magnopy will produce graphical output (.html and .png) files in addition to the .txt output with the actual data.
Note that if you can not install either Plotly or matplotlib, then all functions of magnopy are still available to you. The only missing part would be the visualization.
What is magnopy?#
Magnopy is a python code that, given spin Hamiltonian in any convention, computes bosonic (magnon) Hamiltonian of the form
where
\(E^{(0)}\) is a classical energy of the ground state;
Next three terms are derived within the Linear Spin Wave Theory (LSWT):
\(E^{(2)}\) is a quantum correction to the ground state energy;
\(\omega_{\alpha}(\boldsymbol{k})\) is magnon dispersion at the level of LSWT;
\(\sum_{\boldsymbol{k}}\Delta(\boldsymbol{k})\) is an energy measure of \(\pm \boldsymbol{k}\) asymmetry.
What can it do?#
Computes all terms of the magnon Hamiltonian from above.
Supports spin Hamiltonian in any convention.
Supports a number of physical units both for Hamiltonian's parameters and for the output quantities.
Minimizes classical energy as a function of the spin directions.
Visualizes spin Hamiltonian (experimental)
How to support magnopy?#
Magnopy is a relatively young code and we would highly appreciate your support.
If you use and like magnopy, please give it a star on GitHub.
Please give feedback on your experience with magnopy (see User support page).
If you use magnopy in your research, please cite it (see How to cite? page).