question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exchange-correlation potential in pyscf

See original GitHub issue

Hello! Could you please explain me how does pyscf calculate exchange-correlation potential in GGA case? I analyzed code and it seems to me that pyscf uses only first-order gradients of xc energy density w.r.t. rho from libxc (vrho, vgamma). I found in file “/dft/numint.py” a function “nr_rks” and in case of GGA, for example, it slices the result obtained from “eval_xc” function: exc, vxc = ni.eval_xc(xc_code, rho, spin=0, relativity=relativity, deriv=1, verbose=verbose)[:2] And it uses only exc, vxc, but discards kxc and fxc. Does it mean that pyscf somehow calculates second-order gradients needed for exchange-correlation potential calculation? Or it uses another way for calculating exchange-correlation potential?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
zhendongli2008commented, Aug 13, 2020

Hi Zhenyu,

As answered by others before, vxc® in GGA is usually not computed for SCF, since an equivalent simple expression for the contribution to the Fock matrix can be obtained using integration by part. If you really need it, the chain rule can be used to derive an expression for vxc®, which for example can be found in Eqs. (A1-A6) [ https://aip.scitation.org/doi/10.1063/1.3479401], where we used it for the XC kernel in spin-flip TD-DFT.

Best, Zhendong Li

Zhenyu Zhu ajz34 notifications@github.com 于2020年8月12日周三 下午8:20写道:

To my understanding, doing PBE SCF process does need vxc matrix in atomic orbital form, and does not require fxc; but generating vxc® does need fxc in GGA’s case. For LDA, only vxc (i.e. xc kernel’s first derivative) is required for vxc®. Also, vxc® is actually functional of rho. It’s really tricky for me 😹

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyscf/pyscf/issues/650#issuecomment-672837100, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVP65PRFHPL4NQLYKORVDTSAKCJHANCNFSM4OO62ZMA .

0reactions
zhendongli2008commented, Aug 13, 2020

Sorry, the correct reference should be https://doi.org/10.1063/1.3676736.

Zhendong Li zhendongli2008@gmail.com 于2020年8月13日周四 上午11:58写道:

Hi Zhenyu,

As answered by others before, vxc® in GGA is usually not computed for SCF, since an equivalent simple expression for the contribution to the Fock matrix can be obtained using integration by part. If you really need it, the chain rule can be used to derive an expression for vxc®, which for example can be found in Eqs. (A1-A6) [ https://aip.scitation.org/doi/10.1063/1.3479401], where we used it for the XC kernel in spin-flip TD-DFT.

Best, Zhendong Li

Zhenyu Zhu ajz34 notifications@github.com 于2020年8月12日周三 下午8:20写道:

To my understanding, doing PBE SCF process does need vxc matrix in atomic orbital form, and does not require fxc; but generating vxc® does need fxc in GGA’s case. For LDA, only vxc (i.e. xc kernel’s first derivative) is required for vxc®. Also, vxc® is actually functional of rho. It’s really tricky for me 😹

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyscf/pyscf/issues/650#issuecomment-672837100, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVP65PRFHPL4NQLYKORVDTSAKCJHANCNFSM4OO62ZMA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Density functional theory (DFT) - PySCF
non-local correlation functionals (xc energy involves a double integral). hybrid density functionals (a fraction of exact exchange is used), and. long-range ...
Read more >
Source code for pyscf.dft.xcfun
'APBEX' : 68, #APBE Exchange Functional 'ZVPBESOLC' : 69, #zvPBEsol correlation Functional #'BLOCX' : 70, #BLOC exchange functional 'PBEINTC' : 71, ...
Read more >
dft.rst.txt - PySCF
Please note that earlier PySCF versions (1.5.0 or earlier) did not support compound functional aliases, and both exchange and correlation always had to...
Read more >
SCF and DFT methods - PySCF
PySCF supports periodic Hartree-Fock and density functional theory ... The perdew–burke–ernzerhof exchange-correlation functional applied to the g2-1 test ...
Read more >
Coupled-cluster theory - PySCF
Coupled-cluster (CC) theory is a post-Hartree-Fock method capable of describing electron correlation in the ground state. It is size extensive but not ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found