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]#

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:
spinhamSpinHamiltonian

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 kpoints are 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, then kpoints are 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=1 to run in serial mode.

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.

spglib_symprecfloat, default 1e-5

Tolerance parameter for the space group symmetry search by spglib. Reduce it if the space group is not the one you expected.

Added in version 0.2.0.

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.