 The energy levels of hydrogen can be calculated fairly accurately using the Bohr model of the atom , which conceptualizes the electron as " orbiting " the proton in analogy to the Earth 's orbit of the Sun . However , the atomic electron and proton are held together by electromagnetic force , while planets and celestial objects are held by gravity . Because of the <unk> of angular momentum postulated in early quantum mechanics by Bohr , the electron in the Bohr model can only occupy certain allowed distances from the proton , and therefore only certain allowed energies . 
