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)[source]#

Save the Hamiltonian in the format suitable for Vampire.

Parameters:
spinhamSpinHamiltonian

Spin Hamiltonian to be saved.

seednamestr, default "vampire"

Seedname for the .UCF and .mat files. Extensions are added automatically. Input file always have the name "input".

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 which take (3,3) numpy:ndarray as an input and returns (3,3) numpy:ndarray as an output. If given, then anisotropic and dmi parameters are ignored.

decimalsint, default 4

Number of decimals to be printed (only for the exchange values).

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. Order is the same as in SpinHamiltonian.magnetic_atoms. If not given, each atom will be considered as a separate material. Starting from 0.

no_logobool, default False

Whether to print the logo in the output files.

Returns:
contentstr

Content of the .UCF file if filename is not given.