magnopy.scenarios.optimize_sd#
- magnopy.scenarios.optimize_sd(spinham, supercell=(1, 1, 1), magnetic_field=None, energy_tolerance=1e-05, torque_tolerance=1e-05, output_folder='magnopy-results', comment=None, no_html=False, hide_personal_data=False) None[source]#
Optimizes classical energy of spin Hamiltonian and finds a set of spin directions that describe local minima on the energy landscape.
- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian.
- supercell(3, ) tuple of int
If different from
(1, 1, 1), then a supercell Hamiltonian is constructed and spins are varied within the supercell and not within a unit cell.Added in version 0.2.0.
- 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.
- no_htmlbool, default False
Whether to produce .html files with interactive representation of the data. If
no_html=False, then requires Plotly to be installed.Added in version 0.2.0.
- hide_personal_databool, default False
Whether to use
os.path.abspath()when printing the paths to the output and input files.Added in version 0.2.0.
- spinham
- Raises:
- ValueError
If
len(supercell) != 3.- ValueError
If
supercell[0] < 1orsupercell[1] < 1orsupercell[2] < 1.