A theoretical study of like ion pairs in solution