Akm[k_,m_]:=Piecewise[{{(Ea1g + 2*(Eeg\[Pi] + Eeg\[Sigma]))/5, k == 0 && m == 0}, {(I/6)*(Sqrt[6]*Ea1g - Sqrt[6]*Eeg\[Pi] - 4*Sqrt[3]*Meg), k == 2 && m == -2}, {(1/6 + I/6)*(Sqrt[6]*Ea1g - Sqrt[6]*Eeg\[Pi] - 4*Sqrt[3]*Meg), k == 2 && m == -1}, {(1/6 - I/6)*(-(Sqrt[6]*Ea1g) + Sqrt[6]*Eeg\[Pi] + 4*Sqrt[3]*Meg), k == 2 && m == 1}, {(I/6)*(-(Sqrt[6]*Ea1g) + Sqrt[6]*Eeg\[Pi] + 4*Sqrt[3]*Meg), k == 2 && m == 2}, {-(Sqrt[7/10]*(Ea1g + 2*Eeg\[Pi] - 3*Eeg\[Sigma]))/2, k == 4 && (m == -4 || m == 4)}, {(-1/4 + I/4)*Sqrt[7/5]*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg), k == 4 && m == -3}, {(I*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg))/Sqrt[10], k == 4 && m == -2}, {((-1/4 - I/4)*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg))/Sqrt[5], k == 4 && m == -1}, {(-7*(Ea1g + 2*Eeg\[Pi] - 3*Eeg\[Sigma]))/10, k == 4 && m == 0}, {((1/4 - I/4)*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg))/Sqrt[5], k == 4 && m == 1}, {((-I)*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg))/Sqrt[10], k == 4 && m == 2}, {(1/4 + I/4)*Sqrt[7/5]*(2*Ea1g - 2*Eeg\[Pi] + 3*Sqrt[2]*Meg), k == 4 && m == 3}}, 0]