chemcoord.Cartesian.basistransform

Cartesian.basistransform(new_basis, old_basis=None, orthonormalize=True)

Transform 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 xyz_functions.orthonormalize() as a previous step.

Parameters:
  • old_basis (np.array) –
  • new_basis (np.array) –
  • rotate_only (bool) –
Returns:

The transformed molecule.

Return type:

Cartesian