-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement orbital evaluation #407
Comments
I did a little bit of profiling using this setup:
And this run:
With everything default, the profile looked like:
Setting rcut = 1 resulted in:
This is about a 20% improvement in runtime, and a factor of two in eval_gto(). Obviously the accuracy goes down but even with rcut=1, the L's include all the nearest neighbors, which should be roughly good enough. Or maybe it's good enough for optimization, and then for accurate calculations we crank up rcut? Separately, you can verify that computing the second derivative matrix (as we do for the Laplacian) costs about twice the first derivatives. In QWalk, the laplacian costs about 1/3 of the first derivatives because we compute it directly. If we had a function that computed vgl (value, gradient, laplacian), we could save about a factor of 2 in the kinetic energy calculation. In the above calculation, the time breaks down as:
So reducing the kinetic energy by a factor of 2 would result in a pretty good savings in computational time. This can be done by computing the laplacian of the AOs directly rather than the full Hessian. All the formulas are already in QWalk's source code. So just reducing rcut and implementing a dedicated Laplacian function in eval_gto.c in pyscf would result in pretty significant gains. |
This has been partially resolved by the above PR. However, the laplacian optimization is still to do. |
PySCF's eval_gto seems to be quite slow. Code for other methods doesn't call it frequently, so it hasn't been a bottleneck except in QMC. We can probably code it up in a faster way.
See https://pyscf.org/user/gto.html#basis-format for basis format definitions in PySCF.
I've gotten started trying this out -- we need tests to make sure the new functions are consistent with the old ones, make sure all cases are implemented, and we need profiling to see where we can get performance improvements. Then we also need to implement PBC evaluations.
The text was updated successfully, but these errors were encountered: