code: def _cleave_interface(self, bulk_silica, tile_x, tile_y, thickness):
          
          O_buffer = self._O_buffer
          tile_z = int(math.ceil((thickness + 2*O_buffer) / bulk_silica.periodicity[2]))
          bulk = mb.recipes.TiledCompound(bulk_silica, n_tiles=(tile_x, tile_y, tile_z))
  
          interface = mb.Compound(periodicity=(bulk.periodicity[0],
                                               bulk.periodicity[1],
                                               0.0))
          for i, particle in enumerate(bulk.particles()):
              if ((particle.name == 'Si' and O_buffer < particle.pos[2] < (thickness + O_buffer)) or
                      (particle.name == 'O' and particle.pos[2] < (thickness + 2*O_buffer))):
                  interface_particle = mb.Compound(name=particle.name, pos=particle.pos)
                  interface.add(interface_particle, particle.name + "_{}".format(i))
          self.add(interface)
docs: Carve interface from bulk silica.
  
          Also includes a buffer of O's above and below the surface to ensure the
          interface is coated.