code: def set_permutation_symmetry(force_constants):
      
  
      fc_copy = force_constants.copy()
      for i in range(force_constants.shape[0]):
          for j in range(force_constants.shape[1]):
              force_constants[i, j] = (force_constants[i, j] +
                                       fc_copy[j, i].T) / 2
docs: Enforce permutation symmetry to force cosntants by
  
      Phi_ij_ab = Phi_ji_ba
  
      i, j: atom index
      a, b: Cartesian axis index
  
      This is not necessary for harmonic phonon calculation because this
      condition is imposed when making dynamical matrix Hermite in
      dynamical_matrix.py.