psi4 / psi4

Open-Source Quantum Chemistry – an electronic structure package in C++ driven by Python
http://psicode.org
GNU Lesser General Public License v3.0
971 stars 446 forks source link

Restarting DFT calculation from DF electron density #3070

Closed ftsong22 closed 1 year ago

ftsong22 commented 1 year ago

Assume I have the electron density represented as the expansion coefficients under an DF auxiliary basis (which come from machine learning prediction). Although the kinetic energy cannot be evaluated without an AO basis, theoretically the Kohn-Sham effective potential has no kinetic term and should be able to be constructed from DF density (assume we are using PBE). Then we might restart the DFT from this effective potential.

Is this possible for psi4? And if so, may I have some hints on how to do this?

JonathonMisiewicz commented 1 year ago

This fundamentally isn't how Psi4 works. Psi uses a AO density matrix representation wherever it can, switching to a real space for evaluation of DFT functionals but nowhere else. Maybe you can use Psi4 functions to write your own HF code with this functionality (I'd need to think harder to know if that's even doable), but you can't inject such a density into Psi4's existing HF algorithm.

susilehtola commented 1 year ago

This is possible in principle. You get the Coulomb term using the auxiliary basis expansion; this is already implemented. You can also compute the exchange-correlation contributions from the auxiliary basis expression; this needs to be implemented. Then you have the two-electron contributions to the Fock matrix. Sum these to the core Hamiltonian, you have the full Fock matrix, which you can diagonalize to get orbitals.

ftsong22 commented 1 year ago

Thank you @susilehtola , I will give it a try.