Valence electrons and ion formation