dftlibs / xcauto Goto Github PK
View Code? Open in Web Editor NEWArbitrary order exchange-correlation functional derivatives using JAX.
License: Mozilla Public License 2.0
Arbitrary order exchange-correlation functional derivatives using JAX.
License: Mozilla Public License 2.0
More explicit is better.
I just took something but possibly there is a better, more intuitive name.
Ideas:
derivative
differentiate
.zenodo.json
I'm probably doing something wrong here, but I get different values when I add your b88
and lyp
and compare it against PySCF.
Question Can anyone spot my mistake?
from xcauto.functionals import b88_n_gnn, lyp_n_gnn
import pyscf.dft
print(lyp_n_gnn(1, 1))
print(b88_n_gnn(1, 1))
print( lyp_n_gnn(1, 1) + b88_n_gnn(1,1))
_hyb, fn_facs = pyscf.dft.libxc.parse_xc("1 * B88, 1 * LYP ")
exc = pyscf.dft.libxc._eval_xc(_hyb, fn_facs, np.ones((4, 1)), spin=0, relativity=0, deriv=1, verbose=False)[0]
print(exc)
-0.79051954
[-0.79936469]
I expected the outputs would be the same.
Update: if I change the second argument to 3
it works for some reason. Do you think this is just a coincidence, or is this expected?
print( b88_n_gnn(1,3) + lyp_n_gnn(1,3))
print(pyscf.dft.libxc._eval_xc(_hyb, fn_facs, np.ones((4, 1)), spin=0, relativity=0, deriv=1, verbose=False)[0]
-0.7993647
[-0.79936469]
I managed to get a similar test case to pass for wvn. I imagine my confusion is that wvn
only takes one argument, the electron density n
, whereas b88 and lyp takes two arguments, n
and gnn
. I haven't been able to find any documentation for what that is.
import xcauto.functionals
import pyscf.dft
print( xcauto.functionals.vwn5_n(1) )
_hyb, fn_facs = pyscf.dft.libxc.parse_xc(".2 * HF + .08 * LDA + .72 * B88, .810 * LYP + 1 * VWN")
exc = pyscf.dft.libxc._eval_xc(_hyb, fn_facs[3:4], np.ones((4, 1)), spin=0, relativity=0, deriv=1, verbose=False)[0]
print(exc)
-0.07159259
[-0.07159261]
This is absolutely amazing, thanks so much for this! I'm trying to get b3lyp which seems to consist a linear combination of
{vwn, b88, lyp, LDA}
Of these, all but LDA seem to be implemented here. This will save me soo much time!
Question 0. Did you ever implement B3LYP?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.