A computational investigation of nucleation mechanism and polymorph selection in crystallization