When atoms combine to fill their outer energy shell