Energy and nitrogen fixation