Local order and phase selection in undercooled transition metal based systems: ab initio molecular dynamics study