Transition from an atomic to a molecular Bose–Einstein condensate