Formation reactions of chalcopyrite compounds and the role of sodium doping