optm = optmagsteep(obj,Name,Value)


optm = optmagsteep(obj,Name,Value) determines the lowest energy magnetic configuration within a given magnetic supercell and previously fixed propagation (and normal) vector (see spinw.optmagk). It iteratively rotates each spin towards the local magnetic field thus achieving local energy minimum. Albeit not guaranteed this method often finds the global energy minimum. The methods works best for small magnetic cells and non-frustrated structures. Its execution is roughly equivalent to a thermal quenching from the paramagnetic state.

Input Arguments

spinw object.

Name-Value Pair Arguments

Number of iterations, default value is 100 (it is usually enough). Each spin will be quenched nRun times or until convergence is reached.
Boundary conditions of the magnetic cell, string with allowed values:
  • 'free' Free, interactions between extedned unit cells are omitted.
  • 'per' Periodic, interactions between extended unit cells are retained.

Default value is {'per' 'per' 'per'}.

The size of the magnetic cell in number of crystal unit cells. Default value is taken from obj.mag_str.nExt.
Function that defines non-interacting sublattices for parallelization. It has the following header: cGraph = fSub(conn,nExt), where cGraph is a row vector with \(n_{magExt}\) number of elements, conn is a matrix with dimensions of \([2\times n_{conn}]\) size matrix and \(n_{ext}\) is equal to the nExt parameter. Default value is @sw_fsub.
Vector that assigns all magnetic moments into non-interacting sublattices, contains a single index \((1,2,3...)\) for every magnetic moment in a row vector with \(n_{magExt}\) number of elements. If undefined, the function defined in fSub will be used to partition the lattice.
If true random initial spin orientations will be used (paramagnet), if initial spin configuration is undefined (obj.mag_str.F is empty) the initial configuration will be always random. Default value is false.
Minimum change of the magnetic moment necessary to reach convergence.
Save moment directions for every loop, default value is false.
Minimum field value on the spin that moves the spin. If the molecular field absolute value is below this, the spin won’t be turned. Default is 0.
If true, the magnetic structure in plotted in real time. Default value is false.
Time in second to pause after every optimization loop to slow down plot movie. Default value is 0.
Defines whether to provide text output. The default value is determined by the fid preference stored in swpref. The possible values are:
  • 0 No text output is generated.
  • 1 Text output in the MATLAB Command Window.
  • fid File ID provided by the fopen command, the output is written into the opened file stream.

Output Arguments

Struct type variable with the following fields:
  • obj spinw object that contains the optimised magnetic structure.
  • M Magnetic moment directions with dimensions \([3\times n_{magExt}]\), if saveAll parameter is true, it contains the magnetic structure after every loop in a matrix with dimensions \([3\times n{magExt}\times n_{loop}]\).
  • dM The change of magnetic moment vector averaged over all moments in the last loop.
  • e Energy per spin in the optimised structure.
  • param Input parameters, stored in a struct.
  • nRun Number of loops executed.
  • datestart Starting time of the function.
  • dateend End time of the function.
  • title Title of the simulation, given in the input.

See Also

spinw | spinw.anneal | sw_fsub | sw_fstat