Lone pair electrons are "valence electrons that are not shared with another atom in a covalent bond" (Wikipedia).
Is there a molecule which has only lone pair electrons?
Lone pair electrons are "valence electrons that are not shared with another atom in a covalent bond" (Wikipedia).
Is there a molecule which has only lone pair electrons?
Simple answer: Almost. It is nearly the case that all the valence electrons of the $\ce{CsF(g)}$ monomer can be considered as lone pairs.
At high temperatures you can have gas-phase salt monomers, i.e., single molecules of $\ce{MX(g)}$, where M is a metal ion and X is a non-metal ion (e.g., $\ce{NaCl(g)}$). [See: Gas-Phase Dimerization of Sodium Halides and Formation of Mixed Sodium/Phenyl Iodides] And these would meet IUPAC's definition of a molecule:
An electrically neutral entity consisting of more than one atom (n>1). Rigorously, a molecule, in which n>1 must correspond to a depression on the potential energy surface that is deep enough to confine at least one vibrational state.
https://goldbook.iupac.org/terms/view/M04002.
If the bond between the ions were purely ionic then, yes, you could have bonding in a molecule where there are only non-bonding electrons, i.e., only lone pairs. However, even the most ionic bonds have some covalent character, which means there is some electron sharing.
There are many different ways to assess ionic character. For the purposes of answering this question, I'll (somewhat arbitrarily) use Pauling's formula applied to the difference in electronegativity, since it's simple and well-known. However, note that there are other measures of ionic character besides electronegativity difference; and even when using the latter, there are many formulas besides Pauling's.
Among atoms whose electronegativities have been measured, the most ionic bond possible would be that between F and Cs, which have Pauling electronegativities of $3.98$ and $0.79$, respectively. [Source: Wikipedia: Electronegativities_of_the_elements].
Pauling proposed the following formula to estimate the amount of ionic character in a bond:
$$\text{Amount ionic character} = 1 - e^{-\frac{1}{4}(\chi_A-\chi_B)^2}$$
Plugging those electronegativities into the above formula, we find that the bond in $\ce{CsF(g)}$ has only a small amount (8%) of covalent character:
$$\text{amt. ionic character} = 1 - e^{-\frac{1}{4}(3.98-0.79)^2} = 0.92 \implies \text{amt. covalent character} = 0.08 $$
Thus we can conclude that, in the most ionic molecules, while there is some electron sharing, it is small. Hence all the valence electrons can nearly be considered purely as lone pairs.
Note: Using Pauling electronegativities and Pauling's formula gives a rough approximation of ionic character. A more sophisticated analysis could yield an answer that, while qualitatively similar (it would still show very little covalent character in $\ce{CsF(g)}$), could differ quantitatively.
As an aside (and a caution): The formula in the IUPAC Gold Book ( https://goldbook.iupac.org/terms/view/IT07058 ) is wildly incorrect, and has apparently been so since 2014. It looks like some things got lost during the typesetting. I emailed IUPAC to suggest a correction.
It seems we shouldn't be too hard on IUPAC, since Pauling himself appears to have a typo in his own formula! Here's a screenshot from: Pauling, Linus. The Nature of the Chemical Bond. Third Edition. Ithaca, NY: Cornell university press, 1960, p 98. [Available from: https://archive.org/details/natureofthechemicalbondpauling/page/n115/mode/2up ] You can see the electronegativity difference in eqn. 3-15 is properly exponentiated, but it also should be squared, and it's not:
To confirm that there's a typo in Pauling's book, take a look at the table at the bottom of the above page. If we don't square the electronegativity differences, we don't get the right values (calculations on left); if we do square them, we do (calculations on right) (calculations done in Mathematica; these are screenshots of the inputs and outputs):
en.m.wikipedia.org; instead change them to the usual desktop linksen.wikipedia.org. If somebody is reading on mobile they will be directed to the correct version anyway. Also, it's better to quote whatever you need from the page, rather than just putting the link without explanation. – orthocresol Nov 18 '21 at 12:38