basistransform¶
-
Cartesian.
basistransform
(new_basis, old_basis=array([[ 1., 0., 0.], [ 0., 1., 0.], [ 0., 0., 1.]]), rotate_only=True)[source]¶ Transforms the frame to a new basis.
- This function transforms the cartesian coordinates from an
- old basis to a new one. Please note that old_basis and new_basis are supposed to have full Rank and consist of three linear independent vectors. If rotate_only is True, it is asserted, that both bases are orthonormal and right handed. Besides all involved matrices are transposed instead of inverted.
- In some applications this may require the function
utilities.orthonormalize()
as a previous step.
Parameters: - old_basis (np.array) –
- new_basis (np.array) –
- rotate_only (bool) –
Returns: The transformed molecule.
Return type: