Photon emission studies of the synthesis of molecules by ion implantation