:orphan:
.. _master-tutorial:
****************
Master tutorial
****************
**Target magnopy's version**: |version|
**Last updated**: 9 January 2026
.. raw:: html
.. thumbnail-parent-div-open
.. thumbnail-parent-div-close
.. raw:: html
Magnopy as a python library
===========================
Every page of the tutorial explains some concepts about the |magnopy|_. There is a list
of exercises on top of each tutorial page. Exercises are connected to the content that you
find in each page.
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_0_introduction_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_0_introduction`
.. raw:: html
Introducing magnopy
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_1_crystal_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_1_crystal`
.. raw:: html
Crystal structure
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_2_convention_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_2_convention`
.. raw:: html
Convention of spin Hamiltonian
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_3_spinham_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_3_spinham`
.. raw:: html
Spin Hamiltonian
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_4_magnetic_field_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_4_magnetic_field`
.. raw:: html
Magnetic field
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_5_dipdip_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_5_dipdip`
.. raw:: html
Magnetic dipole-dipole interaction
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_6_energy_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_6_energy`
.. raw:: html
Classical Energy
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_7_wulfric_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_7_wulfric`
.. raw:: html
(extra) Wulfric
.. raw:: html
.. only:: html
.. image:: /master-tutorial/1_python-library/images/thumb/sphx_glr_plot_8_lswt_thumb.png
:alt:
:doc:`/master-tutorial/1_python-library/plot_8_lswt`
.. raw:: html
Linear Spin Wave theory
.. thumbnail-parent-div-close
.. raw:: html
Magnopy as a black box
======================
Alternative way to use magnopy, that does not require knowledge of Python is through
its command line interface.
.. hint::
The command line scripts can be run from within python as well, see:
|magnopy-scenarios|_. One can study the source code of
:external:py:func:`magnopy.scenarios.optimize_sd` and
:external:py:func:`magnopy.scenarios.solve_lswt` for more advance example of how
magnopy can be used as a python library.
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /master-tutorial/2_black-box/images/thumb/sphx_glr_plot-1-optimize-sd_thumb.png
:alt:
:doc:`/master-tutorial/2_black-box/plot-1-optimize-sd`
.. raw:: html
magnopy-optimize-sd
.. raw:: html
.. only:: html
.. image:: /master-tutorial/2_black-box/images/thumb/sphx_glr_plot-2-lswt_thumb.png
:alt:
:doc:`/master-tutorial/2_black-box/plot-2-lswt`
.. raw:: html
magnopy-lswt
.. thumbnail-parent-div-close
.. raw:: html
Solutions for the exercises
===========================
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_0_introduction_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_0_introduction`
.. raw:: html
Introducing magnopy
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_1_crystal_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_1_crystal`
.. raw:: html
Crystal structure
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_2_convention_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_2_convention`
.. raw:: html
Convention of spin Hamiltonian
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_3_spinham_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_3_spinham`
.. raw:: html
Spin Hamiltonian
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_4_magnetic_field_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_4_magnetic_field`
.. raw:: html
Magnetic field
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_6_energy_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_6_energy`
.. raw:: html
Classical Energy
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_7_wulfric_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_7_wulfric`
.. raw:: html
(extra) Wulfric
.. raw:: html
.. only:: html
.. image:: /master-tutorial/3_exercises/images/thumb/sphx_glr_plot_8_lswt_thumb.png
:alt:
:doc:`/master-tutorial/3_exercises/plot_8_lswt`
.. raw:: html
Linear Spin Wave theory
.. thumbnail-parent-div-close
.. raw:: html
.. toctree::
:hidden:
:includehidden:
/master-tutorial/1_python-library/index.rst
/master-tutorial/2_black-box/index.rst
/master-tutorial/3_exercises/index.rst
.. only:: html
.. container:: sphx-glr-footer sphx-glr-footer-gallery
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download all examples in Python source code: master-tutorial_python.zip `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download all examples in Jupyter notebooks: master-tutorial_jupyter.zip `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery