ifilot / pyqint

Python package for evaluating integrals of Gaussian type orbitals in electronic structure calculations

Home Page:https://pyqint.imc-tue.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Final iteration after RHF convergence

Emieeel opened this issue · comments

After the convergence of Hartree-Fock, a nice way to quickly calculate the energy is given by:

$$ E = \frac{1}{2} \sum_{ij} P_{ji} \left(T_{ij} + V_{ij} + H_{ij} \right) + E_{\textrm{nuc-nuc-rep}} $$

Where $P$ is the density matrix, $T$ kinetic, $V$ nuclear repulsion energy and $H$ the Fock matrix. In hf.py, after convergence the density matrix is calculated one more time using the final orbitals, while the Fock matrix still depends on the previous orbitals. However, that makes the above equation inconsistent, as either the previous density should be used or a final Fock matrix should be calculated. This will give a discrepancy in the energy when calculated as above, and I suspect it could give wrong results for post-HF calculations using both the density and the Fock matrix.

Many thanks for reporting this issue. 👍

This issue is patched inv0.15.0: #26 .