radtools.SpinHamiltonian.get_vector#

method

SpinHamiltonian.get_vector(atom1: Atom | str, atom2: Atom | str, R=(0, 0, 0), index1=None, index2=None, relative=False)#

Getter for vector from atom1 to atom2.

Parameters:
atom1Atom or str

:py:class`.Atom` object or atom`s name in (0, 0, 0) unit cell. If name, then it has to be unique among atoms of the crystal.

atom2Atom or str

:py:class`.Atom` object or atom`s name in R unit cell. If name, then it has to be unique among atoms of the crystal.

R(3,) array-like, default (0, 0, 0)

Radius vector of the unit cell for atom2 (i,j,k).

relativebool, default False

Whether to return the vector relative coordinates.

index1int, optional

Index of the atom1.

index2int, optional

Index of the atom2.

Returns:
v(3,) numpy.ndarray

Vector from atom1 in (0,0,0) cell to atom2 in R cell.