code: def _get_supercell(obj, rCut=5.0):
      rCutHard = rCut + 5  # Giving extra space for hard cutOff
      
  
      cell_vectors = obj.get_cell()
      a1, a2, a3 = cell_vectors[0], cell_vectors[1], cell_vectors[2]
  
      # vectors perpendicular to two cell vectors
      b1 = np.cross(a2, a3, axis=0)
      b2 = np.cross(a3, a1, axis=0)
      b3 = np.cross(a1, a2, axis=0)
      # projections onto perpendicular vectors
      p1 = np.dot(a1, b1) / np.dot(b1, b1) * b1
      p2 = np.dot(a2, b2) / np.dot(b2, b2) * b2
      p3 = np.dot(a3, b3) / np.dot(b3, b3) * b3
      xyz_arr = np.linalg.norm(np.array([p1, p2, p3]), axis=1)
      cell_images = np.ceil(rCutHard/xyz_arr)
      nx = int(cell_images[0])
      ny = int(cell_images[1])
      nz = int(cell_images[2])
      suce = obj * (1+2*nx, 1+2*ny, 1+2*nz)
      shift = obj.get_cell()
  
      shifted_suce = suce.copy()
      shifted_suce.translate(-shift[0]*nx - shift[1]*ny - shift[2]*nz)
  
      return shifted_suce
docs: Takes atoms object (with a defined cell) and a radial cutoff.
      Returns a supercell centered around the original cell
      generously extended to contain all spheres with the given radial
      cutoff centered around the original atoms.