# Are difluorine and hydrogen chloride considered isoelectronic?

Why are $$\ce{F2}$$ and $$\ce{HCl}$$ not considered isoelectronic? Both have 18 electrons.

\begin{align} \ce {H}\!:&\ \ce{1 e-}\\ \ce{Cl}\!:&\ \ce{17 e-}\\ \ce{F}\!:&\ \ce{9 e-}\\ \end{align}

$$\ce{F2} \implies 2 \times \ce{9 e- = 18\ e-}$$

$$\ce{HCl \implies 1 e- + 17 e- = 18 e-}$$

If we take this definition of isoelectronicity: Two or more molecular entities (atoms, molecules, or ions) are described as being isoelectronic with each other if they have the same number of electrons, they are actually isoelectronic. Please see "Ultraviolet Spectroscopy And Uv Lasers" edited by Prabhakar Misra, Mark A. Dubinskii, page 35 (available in google books)

But if we take this definition of isoelectronicity: Two or more molecular entities (atoms, molecules, or ions) are described as being isoelectronic with each other if they have a similar electron configuration and the same structure, they are not.