Many-Body Perturbation Theory of the Effective Electron-Electron Interaction for Open-Shell Atoms