You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
There are many negative values in the results of partial charge density for ABACUS #6108
When I use the ABACUS to calculate the partial charge density, I find that there are many negative values in the results, regardless of SPIN1 or SPIN2. Then, I set KPT from 1 3 3 to 1 6 6, the results of SPIN1 become all positive, and those of SPIN2 always have positive and negative values. I want to know how to get correct results with no negative value. Thanks for your help!
In the context of Density Functional Theory (DFT), the short answer is: Physically, no; numerically, sometimes.
Here is the breakdown of why this happens and what it means for your calculations:
The Physical Reality
From a strictly physical and quantum mechanical standpoint, electron density cannot be negative. It represents the probability density of finding an electron at a specific point in space. Since this density is derived from the square of the absolute value of the wavefunction, it is mathematically impossible for a real physical system to have a negative density. A negative value would imply a "negative probability," which has no meaning in physics.
Why You Might See Negative Values
If you encounter negative values in your output files or visualization software, it is usually due to one of the following technical reasons:
Mathematical Artifacts (Fourier Transforms): Most DFT codes use plane waves to represent electron density. When you try to represent a very sharp change in density (like the area near an atomic nucleus) with a finite number of plane waves, you get "ringing" or oscillations. This is known as the Gibbs Phenomenon, which can cause the density to dip slightly below zero in the "troughs" of the wave.
Pseudopotentials: Many calculations use pseudopotentials to smooth out the core electron region. If the pseudopotential is not perfectly "soft" or if the energy cutoff is too low, the numerical interpolation can result in tiny negative values.
Difference Plots: If you are looking at a "Charge Density Difference" map (where you subtract the density of isolated atoms from the total density of a molecule), negative values are expected. In this specific context, a negative value does not mean "negative density"; it represents a depletion of electrons in that area compared to the reference state.
When Should You Worry?
Negligible Values: If the negative values are extremely small (e.g., -1e-10), it is simply a floating-point precision or numerical noise issue. You can safely ignore it.
Significant Negative Values: If the negative values are large, it usually indicates that your Energy Cutoff (ENCUT) is too low or your grid is too coarse. This means your basis set is not sufficient to describe the electron distribution accurately.
Activity
mohanchen commentedon Apr 8, 2025
Thanks for pointing this out, we will try to fix it soon.
mohanchen commentedon Mar 21, 2026
Gemini said:
In the context of Density Functional Theory (DFT), the short answer is: Physically, no; numerically, sometimes.
Here is the breakdown of why this happens and what it means for your calculations:
The Physical Reality
From a strictly physical and quantum mechanical standpoint, electron density cannot be negative. It represents the probability density of finding an electron at a specific point in space. Since this density is derived from the square of the absolute value of the wavefunction, it is mathematically impossible for a real physical system to have a negative density. A negative value would imply a "negative probability," which has no meaning in physics.
Why You Might See Negative Values
If you encounter negative values in your output files or visualization software, it is usually due to one of the following technical reasons:
Mathematical Artifacts (Fourier Transforms): Most DFT codes use plane waves to represent electron density. When you try to represent a very sharp change in density (like the area near an atomic nucleus) with a finite number of plane waves, you get "ringing" or oscillations. This is known as the Gibbs Phenomenon, which can cause the density to dip slightly below zero in the "troughs" of the wave.
Pseudopotentials: Many calculations use pseudopotentials to smooth out the core electron region. If the pseudopotential is not perfectly "soft" or if the energy cutoff is too low, the numerical interpolation can result in tiny negative values.
Difference Plots: If you are looking at a "Charge Density Difference" map (where you subtract the density of isolated atoms from the total density of a molecule), negative values are expected. In this specific context, a negative value does not mean "negative density"; it represents a depletion of electrons in that area compared to the reference state.
When Should You Worry?
Negligible Values: If the negative values are extremely small (e.g., -1e-10), it is simply a floating-point precision or numerical noise issue. You can safely ignore it.
Significant Negative Values: If the negative values are large, it usually indicates that your Energy Cutoff (ENCUT) is too low or your grid is too coarse. This means your basis set is not sufficient to describe the electron distribution accurately.
mohanchen commentedon Mar 21, 2026
I will transfer this to discussion.