  Recently, it was experimentally shown that the performance and thermal
stability of the perovskite MAPbI$_3$ were improved upon the adsorption of a
molecular layer of caffeine. In this work, we used a hybrid methodology that
combines Uncoupled Monte Carlo (UMC) and Density Functional Theory (DFT)
simulations to carry out a detailed and comprehensive study of the adsorption
mechanism of a caffeine molecule on the surface of MAPbI$_3$. Our results
showed that the adsorption distance and energy of a caffeine molecule on the
MAPbI$_3$ surface are 2.0 \r{A} and -0.3 eV, respectively. The
caffeine/MAPbI$_3$ complex presents a direct bandgap of 2.38 eV with two flat
intragap bands distanced 1.15 and 2.18 eV from the top of valence bands.
Although the energy band levels are not significantly shifted by the presence
of caffeine, the interaction MAPbI$_3$/perovskite is enough to affect the
bands' dispersion, particularly the conduction bands.
