From thermodynamic cell models to partitioning cellular automata for diffusion in zeolites. I. Structure of the algorithm