Rupture of molecular thin films observed in atomic force microscopy. I. Theory.