Calculation of nuclear excitation in an electron transition