Intra- and inter-molecular ferromagnetic interaction of transition metal complexes containing pyrimidine or pyrazine derivatives