With ubermag you can drive your micromagnetic simulations from the Jupyter notebook. A single notebook can contain problem description, numerical solving, and data analysis in a self-consistent fashion. Using Python ubermag defines a domain-specific language to describe micromagnetic problems and automatically communicates with low-level simulation tools such as OOMMF.

On the Ubermag mailing list we announce new versions of ubermag and new features. Additionally, Ubermag users can use the mailing list or the Ubermag Zulip chat to ask questions and help others.

Features and packages#


Ubermag is a collection of several independent Python packages that can be used independently as well as in combination. The whole set of packages – the ubermag meta-package – is tailored to micromagnetic simulations. The individual sub-packages can be used in other fields, e.g. fluid dynamics.


Finite-difference scalar and vector fields

  • common mathematical operations

  • domain-specific tools (e.g. topological charge)

  • reading and writing vtk, ovf, and hdf5

  • Visualisation with matplotlib, k3d, and holoviews


Physics of the micromagnetic system

  • Energy equation (Exchange, Zeeman, DMI, …)

  • Dynamics equation (damping, precession, …)

Data analysis

Analysis and visualisation of spatially resolved simulation data (magnetisation snapshots)


Analysis and visualisation of scalar data (reads OOMMF odt and mumax3 txt)


Simulations of experimental techniques used to study magnetism such as

  • Lorentz Transmission Electron Microscopy

  • Magnetic Force Microscopy

  • X-ray Holography

  • Small Angle Neutron Scattering


Numerically solve micromagnetic models


Calculator for Object Oriented MicroMagnetic Framework OOMMF


Calculator for mumax3


Tests for micromagnetic calculators in ubermag


Definition of typesystem descriptors, decorators and shared internal utilities

What is ubermag?#

As a whole, ubermag is a level of (Python) utilities sitting above (”über”) existing micromagnetic simulation packages, such as OOMMF and mumax3. We refer to packages such as OOMMF and mumax3 as the computational backends, or as (micromagnetic) calculators.

By exposing micromagnetic simulations to the Python ecosystem and integration into Jupyter, all the popular tools used in scientific computing for data analysis, numerical analysis, visualisation, machine learning, etc. become readily available.

The ubermag Python packages allow to specify a micromagnetic problem (without making use of any micromagnetic calculator). Only when the micromagnetic problem needs to be solved, the task is delegated to the computational backend.

Design objectives of Ubermag are:

  1. Work towards a common interface (domain spacific language) to multiple simulation packages,

  2. Expose micromagnetic simulations to Python ecosystem,

  3. Make it easier to compare simulation results obtained with different simulation packages, and

  4. Allow execution of micromagnetic simulation in the cloud.


Magnetic systems (left-to-right): Skyrmions, vortex, Bloch point [renderings created with Blender]#

Documentation and tutorials#

If you are new to ubermag you should consider first looking at Getting started which will give a gentle introduction into all the packages inside ubermag.

If you already know the basics of ubermag there is a collection of Examples that show how to solve particular (physical) questions using ubermag and its subpackages. For a documentation of more technical functionality of the different packages please refer to the Package documentation and the API Reference.

An online-workshop has been given in June 2020 for spintalks (spintalks.org), supported by IEEE Magnetics Society (ieeemagnetics.org). A recording of these sessions is available on YouTube. Please note that some functionality in Ubermag has been changed and extended since the workshop recording.

ubermag in the cloud#

If you do not want to install ubermag on your machine, you can use it in the cloud via Binder. This does not require you to have anything installed on your machine and no files will be created. To access it, please use the following badge:

You can setup your own simulation from scratch or upload the notebook you prepared previouly. Please remember to download the notebook after you are done, so that you can upload it again when you start a new online session.


Marijan Beg1, 2, Martin Lang2, 3, Samuel Holt2, 4, Ryan A. Pepper2, Thomas Kluyver5, James Loudon6, Thomas Hicken7, David Cortés Ortuño2, Jeroen Mulkers8, Jonathan Leliaert8, and Hans Fangohr2, 3, 9

  • 1 Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, United Kingdom

  • 2 Faculty of Engineering and Physical Sciences, University of Southampton, Southampton SO17 1BJ, United Kingdom

  • 3 Max Planck Institute for the Structure and Dynamics of Matter, Luruper Chaussee 149, 22761 Hamburg, Germany

  • 4 Department of Physics, University of Warwick, Coventry CV4 7AL, United Kingdom

  • 5 European XFEL GmbH, Holzkoppel 4, 22869 Schenefeld, Germany

  • 6 Department of Materials Science and Metallurgy, University of Cambridge, Cambridge, CB3 0FS, United Kingdom

  • 7 Department of Physics, Durham University, Durham, DH1 3LE, United Kingdom

  • 8 Faculty of Sciences, Ghent University, Krijgslaan 281, S12, 9000 Ghent, Belgium

  • 9 Center for Free-Electron Laser Science, Luruper Chaussee 149, 22761 Hamburg, Germany.

How to cite#

If you use Ubermag or any of its sub-packages for your research please cite:

M. Beg, M. Lang and H. Fangohr, “Ubermag: Toward More Effective Micromagnetic Workflows,” in IEEE Transactions on Magnetics, vol. 58, no. 2, pp. 1-5, Feb. 2022, Art no. 7300205, doi: 10.1109/TMAG.2021.3078896.

  author = {Beg, Marijan and Lang, Martin and Fangohr, Hans},
  journal = {IEEE Transactions on Magnetics},
  title = {Ubermag: Towards more effective micromagnetic workflows},
  year = {2022},
  volume = {58},
  number = {2},
  pages = {1-5},
  doi = {10.1109/TMAG.2021.3078896}


Licensed under the BSD 3-Clause “New” or “Revised” License. For details, please refer to the LICENSE file.


Ubermag is a part of the Horizon 2020 European Research Infrastructure OpenDreamKit project (Project ID 676541). This work was supported by the Fonds Wetenschappelijk Onderzoek (FWO-Vlaanderen) through Project No. G098917N (Jeroen Mulkers) and with a postdoctoral fellowship (Jonathan Leliaert). We also acknowledge support from the Engineering and Physical Scienes Research Council (EPSRC/UKRI) Programme Grant on Skyrmionics (EP/N032128/1).