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:
- atom1
Atomor 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.
- atom2
Atomor str :py:class`.Atom` object or atom`s name in
Runit 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.
- atom1
- Returns:
- v(3,) numpy.ndarray
Vector from atom1 in (0,0,0) cell to atom2 in R cell.