rad-plot-tb2j-magnons.py#

Script for plotting magnon dispersion from TB2J results.

Added in version 0.7.12.

Scrip plots magnon dispersion spectra following the algorithm described in Magnon dispersion.

It requires TB2J output file "exchange.out" and the information about the magnetic ground state.

Example is based on the files from examples folder.

Ground state input#

Two types of ground state is supported:

  • arbitrary directions of spin in the unit cell (or supercell)

    • single-Q incommensurate structure.

To define direction of spins in the supercell use -s, --spin parameter:

rad-plot-tb2j-magnons.py -if exchange.out -s Cr1 0 0 1 Cr2 0 0 1

In the input file "exchange.out" six atoms are present: Br1, Cr1, S1, Br2, Cr2, S2. Only Cr1 and Cr2 have exchange interaction between them. Therefore, it is neccesary to specify spin vectors for Cr1 and Cr2. You can specify spin vectors for all atoms, but it is not necessary.

Spin spiral is defined by two vectors:

It is relative to the model reciprocal cell.

It is given in absolute coordinate in a real space. Only the direction of the vector matters.

Template file#

Exchange template file (see Template specification) can be used to force the symmetry of the model or to filter the exchange Hamiltonian.

Filtering of the model#

For filtering the exchange Hamiltonian there are a few options available:

Arguments#

-if, --input-filename#

Relative or absolute path to the "exchange.out" file, including the name and extension of the file itself.

required
type : str

-tf, --template-file#

Relative or absolute path to the template file, including the name and extension of the file.

required
type : str

-on, --output-name#

Seedname for the output files.

If this parameter is not specified, the result are printed in standard output stream.

default : None
type : str

See also: example.

-op, --output-path#

Relative or absolute path to the folder for saving outputs.

If the folder does not exist then it is created from the specified path. The creation is applied recursively to the path, starting from the right until the existing folder is reached.

default : current directory

See also: example.

-s, --spin#

Spin of the atoms in the model.

For each atom, which has at least one bond connected to it is necessary to specify spin vector. The spin vector is specified in the form of atom`s name followed by three numbers, separated by spaces. The numbers represent the x, y, and z components of the spin vector.

default : None

-Q, --spiral-vector#

Spin spiral vector. Relative to the reciprocal cell.

default : None
type : float

-ra, --rotation-axis#

Direction of global rotation axis. In absolute coordinates in real space.

default : None
type : float
nargs : 3

-p, --path#

Path in reciprocal space for the magnon dispersion.

default : None
type : str

-fs, --force-symmetry#

Whether to force the symmetry of the template on the Hamiltonian.

default : False
type : bool

-R, --R-vector#

R vectors for filtering the exchange Hamiltonian.

In TB2J outputs the bond is defined by atom 1 (from) and atom 2 (to). Atom 1 is always located in (0, 0, 0) unit cell, while atom 2 is located in R = (i, j, k) unit cell. This parameter tells the script to keep only the bonds for which atom 2 is located in one of specified R supercells. Supercells are specified by a set of integers separated by spaces. They are grouped by three starting from the left and forms a set of R vectors. If the last group contains 1 or 2 integers they are ignored.

default : None

-maxd, --max-distance#

(<=) Maximum distance.

All the bonds with the distance between atom 1 and atom 2 greater than maximum distance are excluded from the model.

default : None

-mind, --min-distance#

(>=) Minimum distance.

All the bonds with the distance between atom 1 and atom 2 lower than minimum distance are excluded from the model.

default : None

-st, --save-txt#

Whether to save data to .txt file. Two files appears: "output-name.txt" and "output-name_info.txt". First one contains raw data of the graph, second one contains information about the parameters.

default : False

-i, --interactive#

Whether to show interactive plot.

default : False

-v, --verbose#

Verbose output, propagates to the called methods.

default : False