magnopy.io.dump_vampire_ucf#

magnopy.io.dump_vampire_ucf(spinham: SpinHamiltonian, filename=None, anisotropic=True, dmi=True, custom_mask=None, decimals=5, materials=None, no_logo=False)[source]#

Write .UCF file for Vampire.

Parameters:
spinhamSpinHamiltonian

Spin Hamiltonian to be saved.

filenamestr, optional

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

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.

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.