First-principles study of excitonic self-trapping in diamond.