Application of density matrix methods to the study of spin exchange. I. Barrier to internal rotation in N-acetylpyrrole