So I come back, we have now proven that our algorithm, the Monte Carlo method, really works.
We start from a randomly generated chaos of magnetic moments that are oriented along random orientations.
And then after just taking one after another and randomly reorienting them and then accepting the change
or not accepting the change, we can turn this into a nice ordered Ferrer magnet.
So, of course, so far, the result was pretty much trivial, and we have just tested our method if
it really, really works.
So the thing is, our energy term is still pretty simple, and in reality, there are many, many more
terms here.
And as our troops and dipole dipole interactions that all lead to interesting phenomena and especially
a hot topic in today's research and physics are non linear spin textures like domain volts, for example.
And here I want to show you how you can generate those.
So these are often induced by the so-called Lashinsky Maria into action.
Or you could also call it as a metric exchange interact.
And this corresponds to the last term here.
And you see, this is such a triple product out of some vecteur de IGY and then the two neighboring
vectors I and J.
So it's a bit similar to the exchange interaction, but it does not favor parallel orientations.
But due to the cross product here, it favors perpendicular orientations.
So you see there is some kind of fight between this term and this term.
We have here a parallel orientation that is favourite, and here we have a perpendicular orientation
that is favored.
And you can imagine that this can give rise to some interesting phenomena like nonlinear spin textures
and these defectors.
They are, of course, a bit difficult to explain now in this cause, and this is not really what this
course is about.
I will just tell you that these vectors are determined basically by the symmetry of the sample or more
precisely by a broken inversion symmetry.
So it sounds difficult.
But for example, if you take two materials and put them on top of each other, then you have some broken
inversion symmetry.
And then at the interface of these two layers, you will have these challenges.
Shinseki, Maria Vectors De.
And in our example, we will consider a pretty simple case where these de I.J will always point along
the bond direction connecting two of these atoms.
So for example, if we consider these two, then the bond will go from here to here so that the I.J
will be pointing along this direction.
So, for example, we could call it the X direction.
And so as we see here, we only have x minus x y minus Y.
So we only must consider the terms we must calculate.
The terms were the points along the X direction or along the Y direction.
So here it is, gives us a term D and then unit vector along X times this and unit vector along y times
this.
And if you calculate the cross product, then you will end up with such a term.
This is what we have to implement now in our new energy function.
So since it's pretty similar to the exchange, I will copy this one here and actually let me switch
off the magnetic field for now because we will now focus not on the magnetic fields, but on the DMI.
So I call this energy DMI and energy DMI contribution.
And here we call energy DMI my contribution.
And now here we must just call the results.
So since it's a bit difficult, I will write.
The result is 0.5 times the times and then the neighbors right plus left plus up plus down.
And we will now specify, right?
Left.
Up and down.
And of course, we must also specify the strength, which we could say is 0.3.
So typically, it's very, very small, much smaller than James.
So in is one than this is probably something like zero zero something.
But yeah, let's just consider a bit of a larger value here so that we see something in our result.
So now for the individual neighbors here.
So basically, we start from one moment am I and then consider all the foreign neighbors?
So we have now four terms here and the term with the right neighbors.
So we could say along the positive x direction would be magnetization and then x y zero.
And then we have here the Y coordinate.
So this would be index one times the neighbor and the Z component.
So I copy this.
Take the neighbor to the right.
So here plus one and the z component to.
And then we subtract the other term.
So basically, I take this one and just right here, two comma one.
So no one thing that we learned here for the exchange interaction was we need this modulo with the length
so that we don't run into problems with the indices.
So whenever we have X plus one or X minus one, I write modulo length.
And so this is already our first term.
Now, along the left direction, it's pretty similar.
We have here just x minus one and X minus one.
And now the sign is reversed because the vector node doesn't point from here to here, but from here
to here.
So and since the vector should always point along to bond, it's now opposite.
And so this means we have to change the sign here minus.
And plus.
And now we only need the other one.
So this one we have this time we have magnetization the Z component x y zero times magnetization x component.
So does this zero.
And then along the Y direction.
So this would be y plus one modulo rulings and then minus with the reversed components.
So zero and two and then the down direction was exactly the same, just with the reversed signs.
And of course, not two plus one, but minus one.
OK, and that's it.
Does.
Those are the four neighbors.
We add them up, multiply them by D and zero point five as in the formula here and now, we must just
include this in yeah, in the step exchange.
No notice to exchange, but the step T.
So here I already wrote of day three.
We include the energy corresponding to the geologists De Maria into action, so it would be here.
And since this considers neighbors, we need to factor two this time again.
So energy, DMI contribution and here as well.
OK, that looks good.
And here we don't really need to change much.
Just update two and three at interaction with magnetic fields and DMI.
And I noticed one thing that I missed actually previously, but it didn't really matter because it's
just optional just for tracking.
I didn't update here the energy.
So of course, here I must write
that this is energy exchange, energy, magnetic.
This is what I missed previously, but it didn't matter because we never used this energy list for anything.
We only need the energy change in this one I updated and energy the my.
All right.
So I think I will play now a bit with the parametres and show you then a good solution, so see you
in a second.
So it turns out the first result already was very good.
So I left the step number at five million and I left the devalue at zero point three.
And this is what we got.
So we get a so-called spin spiral.
So it's a spin or two magnetic moment really spirals once around a circle when you go from left to right.
And this is a typical signature of the so-called gelatin scheme area interaction.
So in total, the magnetization is zero here.
So if you add up all of the arrows, they would compensate and would give zero.
But still, you have some order in your system.
So it's nothing compared to the chaotic starting configuration.
It's really well ordered.
But it's the so-called spin spiral where you have this compensated magnetization in total.
All right.
So this was really all I wanted to show you.
This is once again the energy.
And really, we have shown that you can include several more energy terms here.
We have no exchange interaction, interaction with magnetic fields, DMI and now you could go ahead
and add more and more terms to make the system more and more realistic.
And you could also change these parameters, for example, J.
D, to really resemble actual physical samples and materials.
And for example, there exist different materials that have different ratios of DOJ constants that give
different lengths of these periods of these spin spirals.
What you can also do is experiment with the step, size and experiment with the change of the temperature.
And you could, of course, also increase the sample size by increasing the value of length.
But this will then lead to new problems because then it will take more steps to converge because you
have the more moments and then you would have to simulate for even a longer time.
So the whole purpose here was to show you how you can implement a Monte Carlo method and of course,
in general to learn more about Python and physics.
And we've we have really accomplished a working algorithm, and we have been able to solve a different,
difficult problem.
We have been able to show that this chaotic configuration turns it to the smell ordered configuration
just by providing this energy term here.
And this was something we could have never solved analytically, at least not straightforwardly, because
they are just too many variables involved in the system.
So it really works.
But now to get further and to get good results and interesting results and to include more interactions
here is really a science on its own.
And there are really experts in this field who only do Monte Carlo simulations so it can get difficult,
pretty fast.
So here, just as an example, I have increased the size of the system.
So here now we have 40 times, 40 magnetic moments.
And you see, when I now relax the system, it still looks pretty much ordered and we see the non-coding
clarity.
But we do not see this nice spin spiral that is parallel to the edge of the sample.
So here we really see some domain walls that go in a disordered way through the sample.
And this is really what happens when you make the system larger than it gets more and more difficult
to really converge to the actual energetic minimum.
So in this case, you would have to increase the number of steps for the simulation or for the relaxation,
and you should play with the temperature and really from here and it gets difficult and very demanding,
very fast.
So in my research, I also did some of these Monte Carlo simulations, and some of those simulations
took almost three days on the very, very fast computer.
So you see, it gets really, really difficult quickly.