Metal-to-metal charge-transfer transitions: reliable excitation energies from ab initio calculations