The evaluation of molecular electronic matrix elements using the symmetric group