A study of the mass-18 nuclei and the effective interaction in the sd shell