Ab initio Calculations Using CASTEP Code