Lattice model of diffusion-limited bimolecular chemical reactions in confined environments.