Calculation on surface energy and electronic properties of CoS2