code: def reorder_brute(p_atoms, q_atoms, p_coord, q_coord):
      
  
      # Find unique atoms
      unique_atoms = np.unique(p_atoms)
  
      # generate full view from q shape to fill in atom view on the fly
      view_reorder = np.zeros(q_atoms.shape, dtype=int)
      view_reorder -= 1
  
      for atom in unique_atoms:
          p_atom_idx, = np.where(p_atoms == atom)
          q_atom_idx, = np.where(q_atoms == atom)
  
          A_coord = p_coord[p_atom_idx]
          B_coord = q_coord[q_atom_idx]
  
          view = brute_permutation(A_coord, B_coord)
          view_reorder[p_atom_idx] = q_atom_idx[view]
  
      return view_reorder
docs: Re-orders the input atom list and xyz coordinates using all permutation of
      rows (using optimized column results)
  
      Parameters
      ----------
      p_atoms : array
          (N,1) matrix, where N is points holding the atoms' names
      q_atoms : array
          (N,1) matrix, where N is points holding the atoms' names
      p_coord : array
          (N,D) matrix, where N is points and D is dimension
      q_coord : array
          (N,D) matrix, where N is points and D is dimension
  
      Returns
      -------
      view_reorder : array
          (N,1) matrix, reordered indexes of atom alignment based on the
          coordinates of the atoms