Transition between direct and indirect band gap in silicon nanocrystals