is the same. Thus the</span>
<span class="comment">% optimized magnetic structure has opposite chirality than the manual</span>
<span class="comment">% structure. So we should change the chirality. Instead we restore the</span>
<span class="comment">% manual magnetic structure.</span>
banb.mag_str = Mag0;
</pre><pre class="codeoutput">ans = 
  struct with fields:

       k: [3&times;1 double]
       E: -5.4522
       F: [3&times;3 double]
    stat: [1&times;1 struct]
Warning: Some spins are coupled to thems