Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerical issue when performing SBT on complicated functions (e.g. Analytic norm conserving regularized potential) #2

Open
Szkered opened this issue Jan 8, 2024 · 0 comments

Comments

@Szkered
Copy link

Szkered commented Jan 8, 2024

We were trying to implement the regularized potential from this paper All-Electron Plane-Wave Electronic Structure Calculations for solid-state DFT calculation. We use all-electron plane-wave, so we need to transform the regularized potential into the frequency space like Coulombic potential. But unlike the Couloumbic potential which has an analytical formula of $V(k)=Z/k^2$ in the frequency space (can be derived by taking the limit $\alpha\to 0$ with Yukawa potential), we do not have an analytical formula for the regularized potential. So we thought we could use SBT to perform the transformation numerically.

First, we ensured that the implementation of the DFT code and the SBT routine were correct. The test case is the energy gap between two diamond geometries, and the reference value was computed with quantum espresso (QE). Firstly the base DFT code can match the QE result with a sufficiently large FFT mesh. Then we test the correctness of the SBT routine by replacing Coulombic potential with Yukawa potential $V(r, \alpha)=(Z e^{-\alpha r}) / r$ with different $\alpha$. As expected, with small $\alpha$ the energy gap is consistent with the reference value, and as we increase $\alpha$ the energy gap value diverges from the reference.

However, we encountered strange numerical issues when we tried to perform SBT on the regularized potential (equation 4 in the paper). The $V(k)$ calculated with SBT exhibits rapid oscillation, which looks like an artifact produced by the SBT rather than the behavior of the function. Below is the log-log plot of the SBT transform of the regularized potential, plotted against the Coulombic potential in frequency space:
anc_vs_coulomb

Also, the $V(k)$ is very sensitive to how the radius is discretized. Below is the SBT transform of the regularized potential with different radius grids, 1 is with N=10000, rmin=1e-5, rmax=100, and 2 is with N=100000, rmin=1e-5, rmax=1000.
sbt_with_diff_params
This also confirms that the oscillation is an artifact since the oscillation pattern is determined by the radius grid parameters.

However, the SBT is somewhat "self-consistent" in the sense that, we can perform iSBT on the SBT-transformed value and get back the regularized potential in real space pretty well. As shown in the plot below, the iSBT value aligns with the original function in real space very well:
anc_isbt2
The absolute error of the iSBT is quite small:
isbt_err

Now we have several hypothesis, either SBT cannot be applied in this case or there is some numerical instability in the current implementation. We would appreciate your insight on this. Thanks!

code to produce the above plots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant