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, no_html=False, hide_personal_data=False, spglib_symprec=1e-05) None[source]#
Computes magnon Hamiltonian at the level of Linear Spin Wave theory.
Progress of calculation is shown in the standard output (
print()). A bunch of the output files is created and saved on the disk inside theoutput_folder.- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian object.
- 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 (magnetic flux density, B), given in Tesla.
- output_folderstr, default "magnopy-results"
Name for the folder where to save the output files. The folder is created if it does not exist.
- 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, that will be shown in the standard output right after the magnopy's logo.
- no_htmlbool, default False
Added in version 0.2.0.
Whether to produce .html files. If
no_html = False, then Plotly is expected to be available.- hide_personal_databool, default False
Added in version 0.2.0.
If
False, thenos.path.abspath(pathname)is used to show full paths to the output and input files. IfTrue, then onlypathnameis used.- spglib_symprecfloat, default 1e-5
Added in version 0.2.0.
Tolerance parameter for the space group symmetry search by spglib. Reduce it if the space group is not the one you expected.
- 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.