The long-range part of the effective interaction between quasiparticles in nuclei