Dplot output charge density, total number of electron incorrect


Click here for full thread
Just Got Here
Thank you for your reply. It helps a lot!

And, I found the problem I got strange number of electrons.

It's the mesh I used to generate the charge density is not fine enough to capture the wiggling of wavefunction in some place especially for the inner shell electrons. When I change to plot the valence charge density and using a finer mesh, the problem solved.

Thank you for your help!

YY