Magnopy's user guide#
Installation#
Magnopy is a python library that is distributed via Python package index and can be installed as any other python library.
- How to install Magnopy
Details on how install Magnopy with
pipor from source code.
Theory behind#
As with any tool, it is important to understand how Magnopy operates and what can it do. In addition to the paper about Magnopy that describes the method in details, we prepared a few pages with brief summaries of the key concepts needed to understand the code.
- Spin Hamiltonian
What is the spin Hamiltonian and how is it defined in Magnopy.
- Convention of the Hamiltonian
What is a convention of the spin Hamiltonian and how is it treated in Magnopy.
- Minimization of energy
Technical details of the energy minimization procedure implemented in Magnopy.
Magnopy as a Python library#
The first way to use magnopy is to use it within python scripts.
For deeper understanding of Magnopy you can read the page from above, that graphically summarizes data structures of Magnopy. Then you can read materials below where we explain each concept and give code examples.
- Overview
An overview of the core objects in Magnopy. A good place to start.
- Cell
Cell that defines a lattice. Same as \((\boldsymbol{a}_1, \boldsymbol{a}_2, \boldsymbol{a}_3)\) in the paper about Magnopy.
- Atoms/Sites
Magnetic sites that are placed in the cell. They are called "atoms" due to the historical reasons, however in the paper about Magnopy we refer to them as "magnetic sites".
- Convention
Convention of the spin Hamiltonian. Also discussed in Convention of the Hamiltonian.
- Units
Physical units of the Hamiltonian's interaction parameters and other quantities.
- Spin Hamiltonian
Spin Hamiltonian that is defined based on the cell, atoms and convention.
- Spin directions
Spin directions that define the state of the system (in particular, the vacuum state). Same as \(\boldsymbol{z}_{\alpha}\) in the paper about Magnopy.
- Energy
Energy of the Hamiltonian in a particular state defined by the spin directions.
- LSWT
Main entry point for the linear spin wave theory calculations, defined on some spin Hamiltonian and some spin directions.
Magnopy as a black box#
The second way to use magnopy is via a command line interface.
There are a number of scripts that takes some files as an input and produce some other files as an output. You can use those scripts without any knowledge of python, but you will need to run a command in a terminal.
- How to execute scripts?
A guide on how to execute a script from the command line.
Below is the list of the scripts that are available in Magnopy today.
- magnopy-optimize-sd
A script that minimization of classical energy with respect to spin directions.
- magnopy-lswt
A script that computes all terms of the magnon Hamiltonian at the level of linear spin wave theory.
Please reach out to the developer of Magnopy if there is a common calculation that can be performed with it, but there is no dedicated script.
How-to guides#
How to guides are a collection of small code examples that demonstrate how to achieve a small task with Magnopy. They are less verbose than the tutorials (Tutorials) and assume that your can read the materials from the Magnopy as a Python library and API reference for details.
- How to ... ?
A list of how-to guides that are available in Magnopy today.
If you do not see the how-to guide that answers your question, please do not hesitate to ask it via our User support channels.