magnopy.io.dump_vampire#
- magnopy.io.dump_vampire(spinham: SpinHamiltonian, seedname='vampire', anisotropic=True, dmi=True, custom_mask=None, decimals=5, materials=None, no_logo=False) None[source]#
Saves spin Hamiltonian in the format suitable for Vampire (.UCF and .mat).
- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian object to be saved.
- seednamestr, default "vampire"
Seedname for the .UCF and .mat files. Extensions are added automatically. Input file is independent of
seednameand always has the name "input-template".- 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
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]