radtools.Crystal.get_vector#

method

Crystal.get_vector(atom1: Atom | str, atom2: Atom | str, R=(0, 0, 0), relative=False)[source]#

Getter for vector between the atom1 and 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.

Returns:
v(3,) numpy.ndarray

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