Topological criterion for metallic glass formation