magnopy.scenarios.optimize_sd#
- magnopy.scenarios.optimize_sd(spinham, magnetic_field=None, energy_tolerance=1e-05, torque_tolerance=1e-05, output_folder='magnopy-results', comment=None, make_sd_image=None) None[source]#
Optimizes classical energy of spin Hamiltonian and finds a set of spin directions that describe local minima of energy landscape.
- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian.
- magnetic_field(3, ) array-like
Vector of external magnetic field, given in Tesla.
- energy_tolerancefloat, default 1e-5
Tolerance parameter. Difference between classical energies of two consecutive optimization steps.
- torque_tolerancefloat, default 1e-5
Tolerance parameter. Maximum torque among all spins.
- output_folderstr, default "magnopy-results"
Name for the folder where to save the output files. If the folder does not exist then it will be created.
- commentstr, optional
Any comment to output right after the logo.
- make_sd_image(3, ) tuple of int
Whether to produce an html file that displays the spin directions. Three numbers are the repetitions of the unit cell along the three lattice vectors.
- spinham