  We explore a feasibility of measuring atom-wall interaction using atomic
clocks based on atoms trapped in engineered optical lattices. Optical lattice
is normal to the wall.
  By monitoring the wall-induced clock shift at individual wells of the
lattice, one would measure a dependence of the atom-wall interaction on the
atom-wall separation. We rigorously evaluate the relevant clock shifts and show
that the proposed scheme may uniquely probe the long-range atom-wall
interaction in all three qualitatively-distinct regimes of the interaction: van
der Waals (image-charge interaction), Casimir-Polder (QED vacuum fluctuations)
and Lifshitz (thermal bath fluctuations). The analysis is carried out for atoms
Mg, Ca, Sr, Cd, Zn, and Hg, with a particular emphasis on Sr clock.
