magnopy.io.dump_vampire_mat#

magnopy.io.dump_vampire_mat(spinham: SpinHamiltonian, filename=None, materials=None, no_logo=False)[source]#

Write .mat file for Vampire.

Parameters:
spinhamSpinHamiltonian

Spin Hamiltonian to be saved.

filenamestr, optional

Name for the .mat file. No extensions is added automatically. If not given, the output is returned as a string.

materialslist of int, optional

List of materials for the atoms. Has to have the same length as the number of magnetic atoms in the spinham. If not given, each atom will be considered as a separate material. Material index starts from 0 and should contain all consecutive integers between 0 and number of materials. Number of materials cannot be higher than number of magnetic atoms.

no_logobool, default False

Whether to print the logo in the output files.

Notes

Examples of the correct materials list for 5 magnetic atoms

[0, 0, 0, 0, 0]
[1, 3, 2, 1, 0]
[0, 1, 2, 3, 4]