Optimization of hydrogen-evolving photochemical molecular devices.