magnopy.io.dump_vampire_mat#
- magnopy.io.dump_vampire_mat(spinham: SpinHamiltonian, filename, materials=None, no_logo=False) None[source]#
Generates .mat file for Vampire.
- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian object to be saved.
- filenamestr
Name for the .mat file. Extension ".mat" is added if not present.
- materialslist of int, optional
List of materials for the atoms. Length is the same as the number of magnetic atoms in the
spinham(spinham.M). Order is the same as inSpinHamiltonian.magnetic_atoms. If none given, each magnetic atom is considered as a separate material. Material indices start 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 include the logo in the output files.
- spinham
- Raises:
- ValueError
If
materialslist is given and its length is not equal to the number of magnetic atoms in thespinham.- ValueError
If
materialslist does not contain all consecutive integers between 0 and the highest material index.
Notes
Examples of the correct
materialslist for 5 magnetic atoms[0, 0, 0, 0, 0] [1, 3, 2, 1, 0] [0, 1, 2, 3, 4]
Examples of the incorrect
materialslist for 5 magnetic atoms[0, 6, 0, 0, 0] [1, 3, 3, 1, 0] [1, 2, 3, 4, 5]