magnopy.io.dump_vampire_ucf#
- magnopy.io.dump_vampire_ucf(spinham: SpinHamiltonian, filename, anisotropic=True, dmi=True, custom_mask=None, decimals=5, materials=None, no_logo=False) None[source]#
Generates .UCF file for Vampire.
- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian object to be saved.
- filenamestr, optional
Name for the .UCF file. Extension ".UCF" is added if not present.
- anisotropicbool, default True
Whether to output anisotropic exchange.
- dmibool, default True
Whether to output DMI exchange.
- custom_maskfunc, optional
Custom mask for the exchange parameter. Function that takes (3, 3) numpy.ndarray as an input and returns (3, 3) numpy.ndarray as an output. If given, then
anisotropicanddmiparameters are ignored.parameter_to_output = custom_mask(parameter)
- decimalsint, default 4
Number of decimals to be printed (only for the exchange values).
- 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]