code: def omega(self, structure, n, u):
          
          l0 = np.dot(np.sum(structure.lattice.matrix, axis=0), n)
          l0 *= 1e-10 # in A
          weight = float(structure.composition.weight) * 1.66054e-27 # in kg
          vol = structure.volume * 1e-30 # in m^3
          vel = (1e9 * self[0].einsum_sequence([n, u, n, u])
                 / (weight / vol)) ** 0.5
          return vel / l0
docs: Finds directional frequency contribution to the heat
          capacity from direction and polarization
  
          Args:
              structure (Structure): Structure to be used in directional heat
                  capacity determination
              n (3x1 array-like): direction for Cv determination
              u (3x1 array-like): polarization direction, note that
                  no attempt for verification of eigenvectors is made