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

Semi Contracted Mode #92

Open
ilfreddy opened this issue Feb 8, 2019 · 0 comments
Open

Semi Contracted Mode #92

ilfreddy opened this issue Feb 8, 2019 · 0 comments

Comments

@ilfreddy
Copy link
Contributor

ilfreddy commented Feb 8, 2019

This is a brief summary of the discussion @bast and me have had about the XC_CONTRACTED mode of XCFun and how it is used, for future reference, and what we need to improve it.

When doing response calculation, one needs to separate the different contributions BEFORE contracting with the overlap matrix. For GGA functionals this means that one needs four different calls to XCFun: one for each of the density variables n, nx, ny, and nz. MRChem or any other real-space code has a similar problem, because it needs the potential (or its derivatives for response calculations). In the contracted mode this is the only way of getting the right answer now, because all derivatives are contracted and it is only by setting one of the density variables to one and all the others to zero that one can single out each contribution (@bast checked Dirac and confirmed that XCFun is indeed called four times, and it would be eight for open-shell systems).

What we actually need is a semi-contracted mode where all contractions but one are performed and then all four (or more for open shell, metaGGA...) are recovered with one single call of XCFun.

The way XCFun is used now is suboptimal, because all derivatives are still computed, but most of them discarded at each run.

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