Ab initio simulations of tetrahedral amorphous carbon.