Ab initio determination of static, dynamic and dielectric properties of semiconductors