magnopy.Energy.optimize#
method
- Energy.optimize(initial_guess=None, energy_tolerance=1e-05, torque_tolerance=1e-05, quiet=False)[source]#
Optimize 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.
- Returns:
- optimized_directions(M, 3) numpy.ndarray
Optimized direction of the spin vectors.
See also