biotite.structure.is_orthogonal

biotite.structure.is_orthogonal(box)[source]

Check, whether a box or multiple boxes is/are orthogonal.

A box is orthogonal when the dot product of all box vectors with each other is 0.

Parameters
boxndarray, dtype=float, shape=(3,3) or shape=(m,3,3)

A single box or multiple boxes.

Returns
is_orthgonalbool or ndarray, shape=(m,), dtype=bool

True, if the box vectors are orthogonal, false otherwise

Notes

Due to possible numerical errors, this function also evaluates two vectors as orthogonal, when their dot product is not exactly zero, but it is within a small tolerance (\(10^{-6}\)).