@cached<EOL><INDENT>def alignment_a(self):<DEDENT>
from molmod.transformations import Rotation<EOL>new_x = self.matrix[:, <NUM_LIT:0>].copy()<EOL>new_x /= np.linalg.norm(new_x)<EOL>new_z = np.cross(new_x, self.matrix[:, <NUM_LIT:1>])<EOL>new_z /= np.linalg.norm(new_z)<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 a.

           * a parallel to x
           * b in xy-plane with b_y positive
           * c with c_z positive