Ab initio calculation of the structural and electronic properties of carbon and boron nitride using ultrasoft pseudopotentials.