4f wavefunction collapse and giant resonances in molecules