magout = magstr(obj,Name,Value)
magout = magstr(obj,Name,Value) converts the internally stored magnetic
structure (general Fourier representation) into a rotating frame
representation with a single propagation vector, real magnetisation
vectors and the normal axis of the rotation. The conversion is not always
possible, in that case the best possible approximation is used, that
might lead sometimes to unexpected magnetic structures. In this case a
warning is triggered.
The example shows the equivalent represenation of a simple spin helix in the \(ab\)-plane using Fourier components of the magnetization and using the rotating frame. The complex magnetization in the Fourier representation is converted into a real spin vector and a normal vector that defines the axis of rotation.
model = spinw model.addatom('r',[0 0 0],'S',1) model.genmagstr('mode','fourier','S',[1i 1 0]','k',[1/3 0 0]) model.mag_str.F
0.0000 - 1.0000i 1.0000 + 0.0000i 0.0000 + 0.0000i
struct with fields: S: [3×1 double] k: [0.3333 0 0] n: [0 0 1] N_ext: [1 1 1] exact: 1
0 1 0
Name-Value Pair Arguments
true, a warning appears in case the conversion is not exact. Default is
- Size of the magnetic supercell, default value is the value stored in the spinw object (on which the Fourier expansion is defined).
- Origin in lattice units, the magnetic structure will be
calculated relative to this point. Default value is
[0 0 0]. Shifting the origin introduces an overall phase factor.