Core and valence electrons in atom-by-atom descriptions of molecules