mumax3 workshop


We really appreciate the many questions we got asked during the workshop. Most of these questions got answered in a private chat, but since the questions and answers might be usefull to other mumax3 users, we decided to make them public here. Note that these are short snippets from private chat conversations during the presentations. Because of this, the questions and answers might not always be formulated in a self-contained manner. If you have more questions about mumax3, we recommend to ask them on the mumax3 community mailing list

Is it possible to also add Spin Orbit torque in LLG in place of STT in mumax3?

This is possible, but not directly. It uses the custom field capablility which will be discussed in session 4.

Are dipolar interactions included?

Dipolar interactions are included.

In what way is mumax3 better than Oommf

Because mumax3 is GPU accelerated, it can achieve (in general) a better performance.

What is the meaning of 7- smooth ?

In number theory, a n-smooth (or n-friable) number is an integer whose prime factors are all less or equal to n.

Do the perfectly sharp corners not produce unrealistic artefacts? Is there a way to smooth or round corners?

Some problems are indeed very dependent on such details. Typically such "staircase" corners act as pinning or nucleation centers in the dynamics. On the other hand, in an experimental center, there will also be disorder present which leads to same effects. The effect of such staircases on the magnetostatic field can be smoothed using the "edgesmooth" parameter where edgesmooth=8 is good value.

Suppose I want to see if my ground state will be a skyrmion? I can picture doing this by starting at high temperature, running for a bit, cooling, running a bit, cooling, running a bit, etc. But, how do I make sure that I use the configuration from one temperature as the input for the next (lower) temperature?

Using a for-loop, this is done automatically. You can also import a saved configuration by the command Loadfile(filename) as will be discussed later in this session.

Can you have an interlayer coupling be time-dependent?

There is no explicit interlayer coupling feature. If you are asking about the inter regional exchange, well, then the answer is a bit complicated. The exchange parameter between the two regions (e.g. two layers) is the harmonic mean of the two exchange parameters, which can be time dependent. If you do not want to use this default behaviour, then you can use the ext_InterExchange or the ext_scaleExchange, to set or scale the inter-regional exchange. Both the set value and the scalingsfactor should be constant in time.

I would like to know what is the function of EdgeSmooth? And what is the meaning of the numbers from it?

Suppose your geometry is a circle. For the discretization cells at the edge of the circle, they are either part of the geometry or not, and the criterion we use is whether or not the centre of the cell lies within the function that generated the circle. This means that some cells are included for which part of cell actually is not part of the circle and vice versa. The edgesmooth=N function further divides the cell into N^3 subcells and rescales the saturation magnetization of this specific cell based on how many of those subcells lie in the circle. This way, the magnetostatic field is much more realistic an smooth at these edges. Edgesmooth=8 is a good value for smooth edges.

Do mumax have Sot in it??

This is possible, but not directly.It uses the custom field capablility which will be discussed in session 4.

I have a questions: what's the default unit/unit system Mumax3 uses? Does Mumax3 provide any unit transformation methods(commands)?

Mumax uses SI units (so lengths are in m. No conversion tools are given, but the scripting language can easily used to include it.

Is there a cheat sheet kinda thing available for mumax3?

Yes, it's on our website:

It program can be used for antiferromagnetic material? using sublattice

No mumax3 works only for ferromagnets

I wanted to know if you had many layers in a region and use the ScaleExchange, does that change anything? if you didn't have layers but still 2 regions

ext_scaleExchange is not specific to layers. By default, the exchange constant between two neighboring cells of different regions, is the harmonic mean of the two exchange constants. The ext_scaleExchange can be used to scale this harmonic mean.

If the cell size is larger than the exchange length, can it disturb the exchange interaction between cells?

Yes, if the cell size is to large, the exchange energy will not be calculated correctly. It is a bit problem dependent, but the maximum angle between two spins can not be more than about 20░.

What about incorporating RKKY exchange (interlayer) through a spacer between two ferromagnet? Is it possible too?

This might be possible through the use if the custom field features. In session 4, we will explain how to implement custom fields.

What do the colors in the magnetization figures mean?

White is up [m=(0,0,1)], black is down [m=(-1,0,0)], the other colors are used to show the in plane direction.

Is there a quick reference source for magnetic property parameters for common materials? I realize they vary by preparation method but a starting point would be handy. IÆve had a hard time finding a convenient reference.

Check out the following thread on our mailing list:

How does mumax3 handle DMI at the boundaries between regions?

If both DMI constants have the same size, then the harmonic mean is used for the DMI constant between the cells. If they do not have the same sign, then another kind of interpolation is used.

Any insights on the use of relax() vs minimize()?

This is explained in session 3

Thank you, I also curious about since mumax3 calculated total energy from exchange, zeeman and others. But, in the theory zeeman, exchange, DMI, favor differently the direction of the spin (for ex the exchange favor spin parallel to applied in the others hand DMI favor perpendicular). Then how mumax3 got the total energy? Thank you again

Different interaction indeed prefer different spin configurations, but by taking the derivatives of the total energy, all interactions will be correctly taken into account, depending on there relative strenght.

Can mumax3 import external 3d geometry/grids., e.g a 3D polycrystalline microstructure with DF cell?

No. However, using a more advanced script, you can define a "vacuum" region cell by cell and set Msat=0 in this region. Using this appproach, you do not have to set the geometry explicitly using the setGeom(shape) function, because in this case it is the vacuum region which outlines the geometry of the magnet.

Hi, how can we define layer stack of films? I know that I should assign different regions since they are different materials, but do we also need to translate them in z direction or is this done automatically?

You can define a layered stack by making a 3D geometry and assign the cells of each layer to a different region

How to define a 3D structure of a ferromagnetic layer by using ImageShape command?

This is not possible. ImageShape can only be used to create 2D shapes.

I am currently running the 3.10 beta version of mumax3 on Linux. I recently tried to rebuild from source but had some git errors. Do you have any advise on how I can re build from source? At the moment I was planning on just reomoving the old files and starting from scratch.

First, consider download a prebuild mumax3 executable from Building mumax3 yourselves is only necessary if you want to make changes to the code. If you get errors during the compilation of mumax3, you can send a mail to the mailing list to ask for some guidance. Make sure that you mention exactly which steps you took, and what is mentioned in the error message.

what about radeon is !!!

mumax3 is not compatible with Radeon Graphics because it runs on CUDA which is only compatible with NVIDIA hardware.

My Graphics is Radeon. Is mumax3 compatible with this graphics ?

No, only CUDA enabled GPUs of NVIDIA can be used to run mumax3

I do not have nvidia in my system. How I came to know which version of nvidia I need to install??

First, check if you have a cuda enabled GPU in your system. If this is the case, then you can install the latest NVIDIA driver from If you do not have a CUDA enabled graphics card in your machine, you can still try out the examples for yourselves, by running mumax3 in a google collaboratory session for free. Go to for more information of this.

I am currently running the 3.10 beta version of mumax3 on Linux. I recently tried to rebuild from source but had some git errors. Do you have any advise on how I can re build from source? At the moment I was planning on just reomoving the old files and starting from scratch.

Git errors are generally not related to Mumax. The build instructions for mumax3 can be found on

For AFM/FM bilayers, how do we assign the exchange field by the AFM material and also the interlayer coupling between both materials.

AFM can not directly be simulated with Mumax, so simulating such a system fully is not possible. But you can apply an extra effective field on the bottom layer to mimic the exchange field from the AFM

Please, could you convert and open a OVF in Paraview? I''ve experiencing Paraview crashes with severeal converted multiple-regions vtks

To do this, you should convert the ovf file to a vtk file. VTK files can be opened in paraview

Is it ok to run the stp4 and stp5 for example on the same gpu at the same time?

We do not recommended run multiple simulations at the same time on a single GPU.

Can we change the style of the magnetization arrows? How? Thanks.

No, changing the arrow type in the output images of mumax3-convert is not possible.

Mumax3 -i command , can be used in Python ?

yes, you can launch mumax3 from python using the subprocess module:["mumax3","-i",scriptfile])

How can I include the RKKY interaction?

An example can be found on the website

Could you please tell us more how to pick the cell and grid sizes based on sample thickness and dimension? I deal with very thin films typically around 2.5 nm.

If your film is that thin, then the magnetization is probably uniform along the z direction, and you can simply use a grid with only a single layer in your system. The cell size is than 2.5nm in the z direction

Question, If updating from 3.10beta can we just replce the .exe

No, you need to follow the install instructions as mentioned in It is much less cumbersome than the installation of the beta version, so it should go smoothly.

I cannot run the command mumax3 -test it gives the following error:'mumax3.exe' is not recognized as an internal or external command, operable program or batch file.

you need to set PATH environment variable. Jonathan did show how to do this during session 2 of this workshop. I suggest to re-watch that part again.

Do I need to add the mumax3 exectuable or the directory to the path?

you need to add the directory of the executable to the PATH

Can I use mumax on a MacBook? it has AMD.

Than it is not possible to run mumax3 locally, but you can still run it in google collab sessions. Jonathan will show how to do this at the end of his presentation

Could you please show how to set path (in Windows) again? Too fast...

the recordings will be available after the presentation. I suggest to re-watch that part afterwards

Hi, to design a layered stack should the layers be translated in z direction accordingly in order not to overlap (I know that we should assign different regions to different layers)?

a better option is to use the 'layers' shape for this.

SO the API is like a cheat sheet, right?

That's correct!

Kindly share the link to mumax-view

How to install muview on window 10?

muview is a project outside the mumax ecosystem. You should ask the maintainers of muview for the installation instructions. We provide mumax-view, which is a web based viewer. There is no need to install mumax-view. You can run it in the browser on

Another question. On the browser window, is it possible to enlarge the on-the-fly display for the domain structure?

Only by zooming in in your browser (ctrl +scrolling)

Regarding the benchmarks, does Nvidia Quadro RTX5000 works??

Yes, this card should work as far as I know. We do not have every card nvidia produces, and hence we can not run the benchmark for every card. We are interested in the benchmark for this card though. So please send it to us if you are able to run the benchmark script (follow the instructions of Jonathan on how to do this).

What is the region of non-defined material (vacuum?)? For example, if we want to erase a cell from an already defined region, how can we do it? Is it region index -1?

Every cell belongs to a region. So it is not possible to set it to -1.

Hi, I want to simulate [FM/AFM/NM] 10 multi layer, is it possible using Mumax3 ? if yes then how

No, mumax is not designed to calculate antiferromagnetic dynamics

even not for FM/AFM? bilayer

There are ways to abuse mumax to try simulations like this, but we do not recommend this. If you want to use mumax for this purpose we assume that you know very well what you're doing, meaning that you don't need our help to set up these simulations

how to choose the Pol value? i mean the Pol value depends on what? the specific materials we are working?

This a material parameter, so if you do not have an experimental value for your material, you can use tabulated values from literature for this specific material.

Previously I quiet did not understand with not put the cell size bigger then the Maxangle? What do you mean by comparing angle with length?

MaxAngle returns the largest angle between the magnetization directions of two neighboring cells. For the numerical computation of the exchange interaction, it is important that this angle is small (let's say smaller than 0.35rad). So you have to choose the cellsize in such a way that this condition is met. Usually this means that the cellsize has to be smaller than the exchange length.

How does Go compare with Cuda C? What are the main advantages/disadvantages of one over the other wrt MuMax?

go is a higher level language which allows to write nice, readible code that is easy to maintain, while CUDA/C is a low level language that is harnessed to get the computational performance.

How can we simulate VCMA?

You can not simulate the VCMA itself. But you can study the effect of VCMA by simply increasing the anisotropy constant Ku1. (See homework assignment 2)

Was the finite-temperature random field implemented in a way that is compatible with both Euler and Heun, or higher orders of Runge-Kutta?

Yes, see for more information on adaptive timestep solvers for non-zero temperature simulations.

How to use a specific solver? I cant see any parameter in the code.

The command to set the solver is 'SetSolver(i)', where i is the solver id. More information can be found

where can I find Homeworks assignements?

On the last two slides of session 3. You can download the slides on

Hi can I ask if spin-orbit torque is implemented in mumax?

It is possible using the custom field feature. There will be an example on how to use custom fields in session 4.

Can you change the solver of minimize() to use something higher order but not as high as relax()?

You can not change the minimize solver. Note that this solver is a steepest gradient method, which is something totally different as the Runga Kutta solvers used to study the dynamics (and relax)

Hi. How can I include roughness to simulate domain in thin film?

This will be shown in session 4, in the meantime you can check out the "ext_makegrains(float64, int, int)" command or GrainRoughness(float64, float64, float64, int) in the API

Hi Pieter, how can I visualize magnetization in certain step of hysteresis loop? Can I do it with mumax-view?

Yes, you could track it live in the GUI or define to output the full magnetisation at each step.

I have a request- it would be great if you could demonstrate the installation of MuMax3 in HPC cluster. I dont have GPU in my laptop but I have the access to the HPC of my University.

The installation of mumax3 on linux is explained in session 2. Normally, this should be sufficient to get it up and running on the cluster (assuming it runs linux). If this is not the case, you should contact the administrator of the hpc cluster.

Is there a way to prevent the minimize from crashing during a hysteresis loop when it works with relax() but you don't want to wait so long. As in changing the solver or doing something else?

You can run the solver for a very short time period and a strong damping. This smoothens out strong variations in the magnetization. If the magnetization does no longer containt strong variations, then the minimizer should work correctly.