A molecular dynamics study on the formation of metallofullerene