-
Notifications
You must be signed in to change notification settings - Fork 21
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
Solver convergence #175
Solver convergence #175
Conversation
Some of the test failures are of course related to "more iterations" in the Davidson procedure... The mismatches wrt properties/energies are harder to fix probably... 😦 |
Should be updated against current |
@AdrianLDempwolff what do you think about this? How is it done in Q-Chem? |
@maxscheurer here you can find the updated adcc reference data: https://heibox.uni-heidelberg.de/d/cf184e9f2de54bb58683/ |
@apapapostolou the data are uploaded, you need to change the download URL to |
389e51c
to
93134f5
Compare
I think you need to rebase against |
Several people have encountered the problem that the adcc results don’t always match the Qchem results, i.e., excitation energies already deviate in the second digit. Sometimes this only occurs with higher excited states, but we have also had some cases where the first excited states were already affected.
We (@AdrianLDempwolff and @Drrehn) have found that the problem has two different causes, both of which result in the solver procedure converging far less than it should.
davidson.py
, this is done because convergence is also checked this way in Qchem, but this is actually not the case. We have checked the Qchem code.10 * conv_tol
andconv_tol_grad
inpyscf.py
. However, sinceconv_tol_grad
is calculated in Pyscf as the square root ofconv_tol
, it should rather be the maximum ofconv_tol
andconv_tol_grad**2
. This results in the imported convergence tolerance being much greater than it actually is.A brief example will illustrate the consequences of these two points in numbers: If the SCF is converged to
1e-9
with Pyscf (which is the default), this is imported into adcc asreference_state.conv_tol = sqrt(1e-9) = 3.2*1e-5
(seepyscf.py
). Inworkflow.py
, the convergence tolerance for the Davidson is determined from this asconv_tol = max(10 * reference_state.conv_tol, 1e-6) = 3.2*1e-4
. Indavidson.py
, the square of the residual norm is then calculated instead of the residual norm, which means that the actual convergence is onlysqrt(3.2*1e-4)= 3.2*1e-2
, which is clearly too large. In Qchem, the default convergence tolerance is1e-6
.This pull request fixes these two problems.
A minor point is that the convergence tolerance of the reference state is multiplied by a factor of 10 during import and multiplied again by a factor of 10 when determining the default solver convergence tolerance, but shouldn't one time be enough?