Skip to content

Spinmob/macrospinmob

Repository files navigation

Screenshot

Macrospin(mob)

This library provides fast simulations of 1 or 2 magnetic spins. The key feature is that you can specify arbitary time-dependent fields, spin torques, exchange constants, dipole tensors, anisotropy tensors, temperatures, and other torques. A graphical front-end is also provided, allowing visualization and analysis while it runs.

This package is currently under development, it seems to work, but it has yet to be rigorously tested. Feel free to play with it and pester us with questions or feature ideas.

Installing

Macrospin(mob) is built upon Spinmob and uses PyQtGraph for fast plotting. You can install these yourself, or follow the recommended approach.

To install Macrospin(mob), you can just clone the repository directory into your python's site-packages directory. We'll eventually make this a pip package... Once we have field-tested it a bit more.

Running

If you are using a Qt-based python console, you will likely need to set your graphical backend to something other than "inline", because this causes weird behavior.

To run it,

import macrospinmob
s = macrospinmob.solver()

This should pop up the GUI, which you can use to start setting parameters and running the thing. From the console, you can use code suggestions and the integrated help (e.g. in Spyder, type <ctrl>+i) to learn about all the other functionality. There is also macrospinmob.solver_api which provides a low-level scripted object with no graphics; its job is just to interface with the C-compiled library.

Finally, when we make official releases, they will be packaged with binaries for windows, mac, and linux. If you wish to compile the latest code, we've provided scripts for this in the main directory. Inside these scripts are notes about getting it to work (what you should install, etc).

About

Python macrospin simulator based on fast C-code.

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages