CoordinateSystemArray#
- class atompy.CoordinateSystemArray(vectors_1, vectors_2, vectors_3=None)[source]#
Class representing a collection of coordinate systems.
Tip
If you want to store a single coordinate systems, consider
CoordinateSystem.- Parameters:
- vectors_1VectorArrayLike
First set of vectors \(\vec{v}_1\) defining the coordinate system.
- vectors_2VectorArrayLike
Second set of vectors \(\vec{v}_2\) defining the coordinate system. Should not be parallel to vectors_1.
- vector_3VectorArrayLike or
None, defaultNone Optional third set of vectors. If three sets are provided, use them as the new base vectors (after normalization).
- Attributes:
- x_axis, y_axis, z_axis
VectorArray x, y, z basis vectors of the coordinate system.
- x_axis, y_axis, z_axis
Notes
The three basis vectors \(\hat{x}, \hat{y}, \hat{z}\) will be unit vectors along the directions given by, respectively
\[\begin{split}\vec{z} &= \vec{v_1} \\ \vec{y} &= \vec{v_z} \times \vec{v_2} \\ \vec{x} &= \vec{v_y} \times \vec{z}\end{split}\]If three vectors are provided, the directions will be given by
\[\begin{split}\vec{x} &= \vec{v_1} \\ \vec{y} &= \vec{v_2} \\ \vec{z} &= \vec{v_3} \\\end{split}\]Methods
project_vectors(vectors)Project vectors on the coordinate system.