Giter Club home page Giter Club logo

xcauto's People

Contributors

bast avatar robertodr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

robertodr

xcauto's Issues

test case breaks for b88 and lyp

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]

b3lyp

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?

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.