I am confused as to whether integrating over the charge density gets us the number of valence electrons in the material system or the total number of valence electrons in the material system.
Let's take an example: say I have the charge density of Al2O3, which contains exactly 2 atoms of Aluminim and 3 atoms of Oxygen. Now we all know that Al has 3 valence electrons and O has 2 valence electrons. So this charge density has a total of 2*3 + 3*2 = 12 valence electrons right? So if I integrate over the charge density should I get 12 as the result?
It would help all of us understand this better, if one would write out the formula to obtain the valence electrons from the charge density array (rho).
Is no. of valence electrons = round(vol*np.sum(rho)/rho.size)
in python?
Please provide suitable references to your answer.