def get_112_surface(monolayers, vacuum=0, constrain_layers = 0)
      atom1 = Atom.new(0,0,0,self.cation)
      atom2 = Atom.new(self.lattice_const*sqrt(3)/2, 0, 0, self.anion)
      
      v1 = Vector[sqrt(3), 0, 0]*self.lattice_const
      v2 = Vector[0, sqrt(2)/2, 0]*self.lattice_const
      v3 = Vector[1/sqrt(3), 1/(sqrt(3)*2), -1/(sqrt(3)*2)]*self.lattice_const
      
      millerX = Vector[1, 1, -2];
      millerY = Vector[-1, 1, 0];
      millerZ = Vector[-1, -1, -1]

      # The unit cell
       zb = Geometry.new([atom1, atom2], [v1, v2, v3])
       zb.set_miller_indices(millerX, millerY, millerZ)

       # Repeat the unit cell
       zb = zb.repeat(1,1,monolayers)


       if 0 < vacuum
         # Add vacuum
         monolayerSep = v3[2]
         zb.lattice_vectors[2] = Vector[0, 0, (monolayers*monolayerSep).abs + vacuum.to_f]
         # Move everything into a nice tidy unit cell. 
         zb = zb.correct
       end

       # # Constrain the bottom 2 layers
       # zb.atoms.each{|a|
       #   if (a.z < monolayerSep*2)
       #     a.constrain = ".true."
       #   end
       # }


       # Return the completed unit cell
       return zb
    end
def get_112_surface(monolayers, vacuum=0, constrain_layers = 0)
      atom1 = Atom.new(0,0,0,self.cation)
      atom2 = Atom.new(self.lattice_const*sqrt(3)/2, 0, 0, self.anion)
      
      v1 = Vector[sqrt(3), 0, 0]*self.lattice_const
      v2 = Vector[0, sqrt(2)/2, 0]*self.lattice_const
      v3 = Vector[1/sqrt(3), 1/(sqrt(3)*2), -1/(sqrt(3)*2)]*self.lattice_const
      
      millerX = Vector[1, 1, -2];
      millerY = Vector[-1, 1, 0];
      millerZ = Vector[-1, -1, -1]

      # The unit cell
       zb = Geometry.new([atom1, atom2], [v1, v2, v3])
       zb.set_miller_indices(millerX, millerY, millerZ)

       # Repeat the unit cell
       zb = zb.repeat(1,1,monolayers)


       if 0 < vacuum
         # Add vacuum
         monolayerSep = v3[2]
         zb.lattice_vectors[2] = Vector[0, 0, (monolayers*monolayerSep).abs + vacuum.to_f]
         # Move everything into a nice tidy unit cell. 
         zb = zb.correct
       end

       # # Constrain the bottom 2 layers
       # zb.atoms.each{|a|
       #   if (a.z < monolayerSep*2)
       #     a.constrain = ".true."
       #   end
       # }


       # Return the completed unit cell
       return zb
    end
return a unit cell for a slab of 112
 specify the number of atomic monolayers and the vacuum thickness in angstrom