# Na$^+$ should attract Cl$^-$, but their outer electron shell should repel the ions, because it's closer, right?

This may sound like a repetition of this: When do oppositely charged ions (say Na$^+$ and Cl$^-$) stop attracting each other because of their electron shells?

(I asked that too...), but that was about another detail that, though relevant, is a different subject and doubt.

I think the question says it. I am toying with coding a primitive atom simulator, and I have no clue on how to start dealing with the forces involved when dealing with the attraction-repulsion of ions. Say, Na$^+$ and Cl$^-$. What is relevant for me is just the charge of the nucleus (nucleus dimensionless, for my purposes), the radius and charge of the electron shell of 2 atoms.

What do I do? I tried to think of two ions as two positive balls separated by 2 negative walls, and before I wrote any equations to verify stuff, my mind stopped at 'the walls will repel more than the overall ions will attract, because they will always be closer' (We use Coulomb, right?). Then it goes back to 'hold on... but at a distance D, they DO react as differently charged bodies and DO attract'. Help please? Thank you all in advance.

This oscillation is similar to the $\ddot{x}=-\omega^2 x$ behaviour you see for a spring, where $x$ is its displacement relative to equilibrium. The high mass of each nucleus ensures the length scale for this oscillation will be quite small, so for all intents and purposes the ions are locked at an equilibrium separation. And that distance is still small enough for us to think of the ion pair as a bound state, since it will take an ample amount of energy to separate them, just as it takes a lot of energy to snap a spring.