Giter Site home page Giter Site logo

pysbt's People

Contributors

qijingzheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fanyuchang

pysbt's Issues

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.