radtools.dump_spinham_txt#
- radtools.dump_spinham_txt(spinham: SpinHamiltonian, filename=None, anisotropic=True, matrix=True, dmi=True, template=None, decimals=4, additional_stats=None)[source]#
Save the
SpinHamiltonianin a human-readable format.- Parameters:
- spinham
SpinHamiltonian Spin Hamiltonian to be saved.
- filenamestr, optional
Name of the file for the Hamiltonian to be saved in. If not given, the Hamiltonian will be printed in the console.
- anisotropicbool, default True
Whether to output anisotropic exchange.
- matrixbool, default True
Whether to output whole matrix exchange.
- dmibool, default True
Whether to output DMI exchange.
- template
ExchangeTemplate, optional If provided, then not the SpinHamiltonian will be written, but the model based on the template.
- decimalsint, default 4
Number of decimals to be printed (only for the exchange values).
- additional_statsstr, optional
Additional info, which will be printed right after the logo, before the main separator.
- spinham