Entrapping molecules in zeolites nanocavities: A thermodynamic and ab-initio study