The effective interaction between nucleons deduced from nuclear spectra