Skip to content

Commit ae07548

Browse files
committed
Moved spin stiffness example
1 parent d1b684d commit ae07548

File tree

1 file changed

+73
-73
lines changed

1 file changed

+73
-73
lines changed

content/magnon/magnon.rst

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,6 @@
11
Magnon spectra and noncollinear magnetism
22
=========================================
33

4-
Tutorial 0: Spin wave stiffness
5-
-------------------------------
6-
7-
The spin wave stiffness and the related property exchange stiffness provides the bridge between atomistic spin dynamics and micromagnetism.
8-
9-
A setup for bcc Fe where the stiffness can be calculated can be seen below
10-
11-
.. literalinclude:: Stiffness/inpsd.dat
12-
13-
Notice that we actually have no ``ip_mode`` nor ``mode`` sections, because here we are actually not interested in running any simulation.
14-
15-
The ``posfile`` and ``momfile`` are here as follows
16-
17-
.. literalinclude:: Stiffness/posfile
18-
19-
.. literalinclude:: Stiffness/momfile
20-
21-
The exchange interaction file ``jASD2S`` can be downloaded from :download:`here <https://raw.githubusercontent.com/UppASD/UppASD/master/examples/Mappings/bccFe-variants/jASD2S>` .
22-
23-
* Calculate the spin wave stiffness for the system and examine how the results depend on the choice of ``eta_max`` and ``eta_min``.
24-
25-
The output from the stiffness calculations are found in the ``asd_micro.bccFe100.out`` file.
26-
27-
28-
Tutorial 0b: Spin wave scripts
29-
------------------------------
30-
31-
Even though the calculation of magnon spectra will be practiced on in more detail enough,
32-
one can also use the setup above to quickly showcase the functionality of the ``preQ.py`` and ``postQ.py`` scripts.
33-
34-
These scripts are available in the repository but are continiously evolving. Up-to-date scripts are provided here: :download:`preQ.py <./Stiffness/preQ.py>` and :download:`postQ.py <./Stiffness/postQ.py>`
35-
36-
* Use the ``preQ.py`` script to setup a k-space path for the spin wave dispersion in bcc Fe, run the system, and plot the resulting ``ams.png`` by using ``postQ.py``.
37-
38-
Optional:
39-
* The ``preQ.py`` script provides several k-space paths. Compare the calculated magnon DOS ``magdos.bccFe100.out`` when using either ``qpoints D`` and ``qfile ./qfile.kpath`` or ``qpoints R`` and ``qfile ./qfile.reduced``.
40-
41-
424

435
Tutorial 1: Fe in bcc and fcc crystal structures
446
------------------------------------------------
@@ -82,7 +44,7 @@ Using the lines below, the systems is driven to the ground state.
8244
ip_mode M
8345
ip_mcanneal 1
8446
10000 0.001 1.00e-16 0.95
85-
47+
8648
mode M
8749
Temp 0.001 K Temperature of the system
8850
hfield 0.00000 0.00000 0.00000 Static H field
@@ -129,15 +91,15 @@ Questions and exercises:
12991
^^^^^^^^^^^^^^^^^^^^^^^^
13092

13193
1. Does the spectra follow the analytical expression?
132-
2. Why the spectra is shift it up?
94+
2. Why the spectra is shift it up?
13395
3. Plot the spectra without the gap around the center zone.
13496
4. Why there are two branches, 1 acoustic and 1 optical?
13597
5. Plot the spectrum for Fe fcc. Why now there is just 1 branch? Is it following the analytical expression?
13698

13799
.. figure:: figures/tutorial1/fig7.png
138100

139101
Fig 7. Adiabatic magnon spectra of Fe FCC.
140-
102+
141103
Tutorial 2: FM Heisenberg nearest-neighbour spin chain
142104
------------------------------------------------------
143105

@@ -158,8 +120,8 @@ Using the lines below with the indicated files, the crystal and magnetic structu
158120
cell 1.00000 0.00000 0.00000
159121
0.00000 1.00000 0.00000
160122
0.00000 0.00000 1.00000
161-
Sym 1 Symmetry of lattice (0 for no, 1 for cubic, 2 for 2d cubic, 3 for hexagonal)
162-
123+
Sym 1 Symmetry of lattice (0 for no, 1 for cubic, 2 for 2d cubic, 3 for hexagonal)
124+
163125
posfile ./posfile Position file
164126
exchange ./jfile Exchange file
165127
momfile ./momfile Moment file
@@ -177,11 +139,11 @@ Using the lines below, the systems is driven to the ground state by spin dynamic
177139

178140
Mensemble 1 Number of samples in ensemble averaging
179141
Initmag 3 (1=random, 2=cone, 3=spec., 4=file)
180-
142+
181143
ip_mode S Initial phase parameters
182144
ip_nphase 1
183145
20000 1.0e-3 1e-16 4.0
184-
146+
185147
mode S S=SD, M=MC
186148
temp 1.0e-3 Measurement phase parameters
187149
damping 0.0010 --
@@ -201,7 +163,7 @@ We calculate the spin wave spectrum (in this case, a collinear adiabatic magnon
201163

202164
do_ams Y Collinear Adiabatic magnon spectra
203165
do_magdos N Generate magnon density of states
204-
166+
205167
qpoints F Flag for q-point generation (F=file,A=automatic,C=full cell)
206168
qfile ./qfile Path along the high symmetry points in the reciprocal space
207169

@@ -250,7 +212,7 @@ Questions and exercises:
250212

251213
1. Does it follows the analytical expression predicted by Linear Spin Wave Theory?
252214

253-
215+
254216
Tutorial 3: AFM Heisenberg nearest-neighbour spin chain
255217
-------------------------------------------------------
256218

@@ -273,7 +235,7 @@ Using the lines below with the indicated files, the crystal and magnetic structu
273235
0.00000 1.00000 0.00000
274236
0.00000 0.00000 2.000000
275237
Sym 1 Symmetry of lattice (0 for no, 1 for cubic, 2 for 2d cubic, 3 for hexagonal)
276-
238+
277239
posfile ./posfile
278240
exchange ./jfile
279241
momfile ./momfile
@@ -294,7 +256,7 @@ Using the lines below, the systems is driven to the ground state by spin dynamic
294256
ip_mode S Initial phase parameters
295257
ip_nphase 1
296258
20000 1.0e-3 1e-16 4.0
297-
259+
298260
mode S S=SD, M=MC
299261
temp 1.0e-3 Measurement phase parameters
300262
damping 0.0010 --
@@ -314,7 +276,7 @@ We calculate the spin wave spectrum (in this case, a collinear adiabatic magnon
314276

315277
do_ams Y Collinear Adiabatic magnon spectra
316278
do_magdos N Generate magnon density of states
317-
279+
318280
qpoints D Flag q-point generation(F=file,A=automa.,C=full cell,D=external
319281
file with direct coordinates)
320282
qfile ./qfile Path along the high symmetry points in the reciprocal space
@@ -372,7 +334,7 @@ Questions and exercises:
372334
1. Does it follows the analytical expression predicted by Linear Spin Wave Theory? Why is linear around the center zone?
373335
2. Calculate analytically the Energy/spin and show it is the same as the numerical result.
374336

375-
337+
376338
Tutorial 4: FM Heisenberg nearest-neighbour spin chain with DM interactions
377339
---------------------------------------------------------------------------
378340

@@ -395,7 +357,7 @@ Using the lines below with the indicated files, the crystal and magnetic structu
395357
0.00000 1.00000 0.00000
396358
0.00000 0.00000 4.00000
397359
Sym 0 Symmetry of lattice (0 for no, 1 for cubic, 2 for 2d cubic, 3 for hexagonal)
398-
360+
399361
posfile ./posfile
400362
exchange ./jfile
401363
momfile ./momfile
@@ -419,7 +381,7 @@ Using the lines below, the systems is driven to the ground state by MonteCarlo.
419381
ip_mode M
420382
ip_mcanneal 1
421383
100000 1.0e-3
422-
384+
423385
mode S S=SD, M=MC
424386
temp 1.0e-3 Measurement phase parameters
425387
damping 0.0010 --
@@ -439,7 +401,7 @@ We calculate the non-collinear and collinear spin wave spectrum at the list of
439401

440402
do_ams Y Collinear Adiabatic magnon spectra
441403
do_diamag Y Non-Collinear Adiabatic magnon spectra
442-
404+
443405
qpoints D Flag q-point generation(F=file,A=automa.,C=full cell,D=external
444406
file with direct coordinates)
445407
qfile ./qfile Path along the high symmetry points in the reciprocal space
@@ -497,7 +459,7 @@ Questions and exercises:
497459
1. Do you understand why Collinear AMS failed in this case?
498460

499461

500-
462+
501463
Tutorial 5: Kagome system with DM interactions
502464
----------------------------------------------
503465

@@ -519,9 +481,9 @@ Using the lines below with the indicated files, the crystal and magnetic structu
519481
cell 1.000000000000 0.000000000000 0.000000000000
520482
-0.500000000000 0.866025403784 0.000000000000
521483
0.000000000000 0.000000000000 10.00000000000
522-
484+
523485
Sym 0
524-
486+
525487
posfile ./posfile
526488
posfiletype D C=Cartesian or D=direct coordinates in posfile
527489
momfile ./momfile
@@ -545,7 +507,7 @@ Using the lines below, and using a momfile with previous minimization, the syste
545507
ip_mcanneal 2
546508
10000 100.0001
547509
10000 0.0001
548-
510+
549511
mode S S=SD, M=MC
550512
temp 0.0001
551513
Nstep 60000
@@ -561,7 +523,7 @@ We calculate the non-collinear spin wave spectrum (in this case, a collinear adi
561523

562524
do_ams Y Collinear Adiabatic magnon spectra
563525
do_diamag Y Non-Collinear Adiabatic magnon spectra
564-
526+
565527
qpoints D Flag q-point generation(F=file,A=automa.,C=full cell,D=external
566528
file with direct coordinates)
567529
qfile ./qfile Path along the high symmetry points in the reciprocal space
@@ -591,13 +553,13 @@ Use the UppASD graphical interface (ASDGUI) or the script enclosed in this cours
591553
do_sc Q
592554
sc_nstep 500
593555
sc_step 90
594-
do_sc_local_axis B Perform SQW along local quantization axis (SA) (Y/N/B)
556+
do_sc_local_axis B Perform SQW along local quantization axis (SA) (Y/N/B)
595557
B--> B_effxSA
596-
sc_window_fun 2 Choice of FFT window function (1=box, 2=Hann, 3=Hamming,
558+
sc_window_fun 2 Choice of FFT window function (1=box, 2=Hann, 3=Hamming,
597559
4=Blackman-Harris)
598560
sc_average N Averaging of S(q,w): (F)ull, (E)ven, or (N)one
599561
do_sc_tens N Print the tensorial values s(q,w) (Y/N)
600-
562+
601563
qpoints D
602564
qfile ./qfile
603565

@@ -633,14 +595,14 @@ Using the lines below with the indicated files, the crystal and magnetic structu
633595
cell 1.000000000000 0.000000000000 0.000000000000
634596
-0.500000000000 0.866025403784 0.000000000000
635597
0.000000000000 0.000000000000 10.00000000000
636-
598+
637599
Sym 3 Symmetry of lattice (0 for no, 1 for cubic, 2 for 2d cubic, 3 for hexagonal)
638-
600+
639601
posfile ./posfile
640602
posfiletype D C=Cartesian or D=direct coordinates
641603
momfile ./momfile
642604
exchange ./jfile
643-
605+
644606
maptype 2
645607
do_jtensor 1
646608

@@ -666,15 +628,15 @@ Using the lines below the system is evolved in time. Notice that in the initial
666628
10000 10.0001 1.0e-16 5.0
667629
20000 1.0001 1.0e-16 5.0
668630
50000 0.00000 1.0e-16 5.0
669-
631+
670632
mode S S=SD, M=MC
671633
temp 0.1
672634
Nstep 59500
673635
damping 0.001
674636
timestep 1e-16
675637
qm_nvec 0 0 1 Unit-vector perpendicular to spins
676638
qm_svec 0 1 0 Direction of the spin
677-
639+
678640
Spin wave spectrum
679641
^^^^^^^^^^^^^^^^^^
680642

@@ -683,14 +645,14 @@ We calculate the non-collinear spin wave spectrum (in this case, a collinear adi
683645
::
684646

685647
do_diamag Y Non-Collinear Adiabatic magnon spectra
686-
648+
687649
qpoints D Flag q-point generation(F=file,A=automa.,C=full cell,D=external
688650
file with direct coordinates)
689651
qfile ./qfile Path along the high symmetry points in the reciprocal space
690-
652+
691653
nc_qvect 0.330000 0.571577 0.000000 Ordering wave vector
692-
nc_nvect 0.0 0.0 1.0 Pitch-vector along z and the moments rotate
693-
in the xy-plane
654+
nc_nvect 0.0 0.0 1.0 Pitch-vector along z and the moments rotate
655+
in the xy-plane
694656
qm_nvec 0 0 1 Unit-vector perpendicular to spins
695657
qm_svec 0 1 0 Direction of the spin
696658

@@ -719,9 +681,9 @@ Use the UppASD graphical interface (ASDGUI) or the script enclosed in this cours
719681
do_sc Q
720682
sc_nstep 700
721683
sc_step 85
722-
do_sc_local_axis B Perform SQW along local quantization axis (SA) (Y/N/B)
684+
do_sc_local_axis B Perform SQW along local quantization axis (SA) (Y/N/B)
723685
B--> B_effxSA
724-
sc_window_fun 2 Choice of FFT window function (1=box, 2=Hann, 3=Hamming,
686+
sc_window_fun 2 Choice of FFT window function (1=box, 2=Hann, 3=Hamming,
725687
4=Blackman-Harris)
726688

727689
.. figure:: figures/tutorial6/fig4.png
@@ -755,3 +717,41 @@ Eq 4. Excitation energy for spin waves in an isotropic antiferromagnet.
755717
.. figure:: figures/equations/fig5.png
756718

757719
Eq 5. Excitation energy for spin waves in an isotropic ferromagnet.
720+
721+
722+
Tutorial 7: Spin wave stiffness
723+
-------------------------------
724+
725+
The spin wave stiffness and the related property exchange stiffness provides the bridge between atomistic spin dynamics and micromagnetism.
726+
727+
A setup for bcc Fe where the stiffness can be calculated can be seen below
728+
729+
.. literalinclude:: Stiffness/inpsd.dat
730+
731+
Notice that we actually have no ``ip_mode`` nor ``mode`` sections, because here we are actually not interested in running any simulation.
732+
733+
The ``posfile`` and ``momfile`` are here as follows
734+
735+
.. literalinclude:: Stiffness/posfile
736+
737+
.. literalinclude:: Stiffness/momfile
738+
739+
The exchange interaction file ``jASD2S`` can be downloaded from :download:`here <https://raw.githubusercontent.com/UppASD/UppASD/master/examples/Mappings/bccFe-variants/jASD2S>` .
740+
741+
* Calculate the spin wave stiffness for the system and examine how the results depend on the choice of ``eta_max`` and ``eta_min``.
742+
743+
The output from the stiffness calculations are found in the ``asd_micro.bccFe100.out`` file.
744+
745+
746+
Tutorial 0b: Spin wave scripts
747+
------------------------------
748+
749+
Even though the calculation of magnon spectra will be practiced on in more detail enough,
750+
one can also use the setup above to quickly showcase the functionality of the ``preQ.py`` and ``postQ.py`` scripts.
751+
752+
These scripts are available in the repository but are continiously evolving. Up-to-date scripts are provided here: :download:`preQ.py <https://raw.githubusercontent.com/UppASD/UppASD/refs/heads/master/ASD_Tools/preQ.py>` and :download:`postQ.py <https://raw.githubusercontent.com/UppASD/UppASD/refs/heads/master/ASD_Tools/postQ.py>`
753+
754+
* Use the ``preQ.py`` script to setup a k-space path for the spin wave dispersion in bcc Fe, run the system, and plot the resulting ``ams.png`` by using ``postQ.py``.
755+
756+
Optional:
757+
* The ``preQ.py`` script provides several k-space paths. Compare the calculated magnon DOS ``magdos.bccFe100.out`` when using either ``qpoints D`` and ``qfile ./qfile.kpath`` or ``qpoints R`` and ``qfile ./qfile.reduced``.

0 commit comments

Comments
 (0)