Chemistry of reactions proceeding inside molecular aggregates