Theoretical study of species formed by IA and IB metals or ions and a CN ligand