radtools.read_tb2j_model#

radtools.read_tb2j_model(filename, quiet=True) ExchangeHamiltonian[source]#

Read exchange Hamiltonian from TB2J output file.

Changed in version 0.7.

In TB2J exchange Hamiltonian is define in a following notation:

\[H = -\sum_{i,j} \hat{\boldsymbol{S}}_i \cdot \boldsymbol{J}_{i,j} \hat{\boldsymbol{S}}_j\]

where spin vectors \(\boldsymbol{S}_i\) are normalized to 1 and double counting is present (both \(ij\) and \(ji\) are in the sum). ExchangeHamiltonian can store exchange values in any notation. One could check the notation by calling the attribute ExchangeHamiltonian.notation.

This function reads and stores exchange parameters in the notation of Hamiltonian mentioned above.

Distance between the atoms are not read from the atoms, but rather computed from the unit cell and atom positions (see Crystal.get_distance()). If the distance read from the file is different from the computed one and quiet=False, the warning is printed. It is usual for the computed and read distances to differ in the last digits, since the unit cell is provided with the same precision as the distance in TB2J output file.

Parameters:
filenamestr

Path to the TB2J output file.

quietbool, default True

Whether to suppress output.

Returns:
modelExchangeHamiltonian

Exchange Hamiltonian build from TB2J file. With notation set to "TB2J".