Electronic structures of phosphorus-doped diamond films and impacts of their vacancies