magnopy.scenarios.solve_lswt#
- magnopy.scenarios.solve_lswt(spinham, spin_directions=None, k_path=None, kpoints=None, relative=False, magnetic_field=None, output_folder='magnopy-results', number_processors=None, comment=None, make_sd_image=None) None[source]#
Solves the spin Hamiltonian at the level of Linear Spin Wave theory. Outputs progress in the standard output (
print()) and saves some data to the files on the disk.- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian.
- spin_directions(M, 3) array-like, optional.
Directions of the local quantization axis for each spin. Magnitude of the vector is ignored, only the direction is considered. If
None, then magnopy attempts to optimize classical energy of spin Hamiltonian to determine spin directions.- k_pathstr, optional
Specification of the k-path. The format is "G-X-Y|G-Z" For more details on the format see documentation of wulfric. If nothing given, then the k-path is computed by wulfric automatically based on the lattice type. Ignored if
kpointsare given.- kpoints(N, 3) array-like, optional
Explicit list of k-points to be used instead of automatically generated.
- relativebool, default False
If
relative == True, thenkpointsare interpreted as given relative to the reciprocal unit cell. Otherwise it is interpreted as given in absolute coordinates.- magnetic_field(3, ) array-like
Vector of external magnetic field, given in Tesla.
- 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.
- number_processorsint, optional
Number of processors to be used in computation. By default magnopy uses all available processes. Use
number_processors=1to run in serial mode.- 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
Notes
When using this function of magnopy in your Python scripts make sure to safeguard your script with the
import magnopy # Import more stuff # or # Define your functions, classes if __name__ == "__main__": # Write your executable code here
For more information refer to the "Safe importing of main module" section in multiprocessing docs.