Resonances and nuclear molecular configurations in heavy-ion reactions