Chemical reactions in solar cells