Sum-over-states calculation of the nuclear spin–spin coupling constants