@cached<EOL><INDENT>def alignment_c(self):<DEDENT>
from molmod.transformations import Rotation<EOL>new_z = self.matrix[:, <NUM_LIT:2>].copy()<EOL>new_z /= np.linalg.norm(new_z)<EOL>new_x = np.cross(self.matrix[:, <NUM_LIT:1>], new_z)<EOL>new_x /= np.linalg.norm(new_x)<EOL>new_y = np.cross(new_z, new_x)<EOL>new_y /= np.linalg.norm(new_y)<EOL>return Rotation(np.array([new_x, new_y, new_z]))<EOL>
Computes the rotation matrix that aligns the unit cell with the
           Cartesian axes, starting with cell vector c.

           * c parallel to z
           * b in zy-plane with b_y positive
           * a with a_x positive