magnopy.Energy.optimize#

method

Energy.optimize(initial_guess=None, energy_tolerance=1e-05, torque_tolerance=1e-05, quiet=False, quantum_correction=False)[source]#

Optimizes classical energy by varying the directions of spins in the unit cell.

Parameters:
initial_guess(M, 3) or (3,) array-like, optional

Initial guess for the direction of the spin vectors.

energy_tolerancefloat, default 1e-5

Energy tolerance for the two consecutive steps of the optimization. In the units of meV.

torque_tolerancefloat, default 1e-5

Torque tolerance for the two consecutive steps of the optimization. In the units of meV.

quietbool, default False

Whether to suppress the output of the progress.

quantum_correctionbool, default False

Whether to include quantum correction to the energy in the optimization. If True, then it optimizes Energy.E_0() + Energy.E_corr(). If False, then it optimizes Energy.E_0() only.

Warning

This option is experimental. Will be improved and tested in future releases. Use with caution.

Returns:
optimized_directions(M, 3) numpy.ndarray

Optimized direction of the spin vectors.

See also

optimize_generator