ightly lower energy by allowing a tiny deviation from the propagation vector of [0 0 1/7].</p><pre class="codeinput">banb.optmagk
banb.optmagsteep(<span class="string">'nRun'</span>,1e4)
banb.genmagstr(<span class="string">'mode'</span>,<span class="string">'rotate'</span>,<span class="string">'n'</span>,[0 0 1])
E2 = banb.energy;
E2-E1

<span class="comment">% The vetor normal to the rotation is opposite compared to the manual</span>
<span class="comment">% magnetic structure, while the propagation vector 