Theoretical study of metal-nonmetal transition in microclusters