orthormalize

chemcoord.utilities.orthormalize(basis)[source]

Orthonormalizes a given basis.

This functions returns a right handed orthormalized basis. Since only the first two vectors in the basis are used, it does not matter if you give two or three vectors.

Right handed means, that:

  • np.cross(e1, e2) = e3
  • np.cross(e2, e3) = e1
  • np.cross(e3, e1) = e2
Parameters:basis (np.array) – An array of shape = (3,2) or (3,3)
Returns:A right handed orthonormalized basis.
Return type:new_basis (np.array)