From a460863632d43a0c4aecb2f0d64ca68c835a5ab2 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 25 May 2020 23:32:23 +0200 Subject: [PATCH] DIIS stability --- src/scf_utils/roothaan_hall_scf.irp.f | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/scf_utils/roothaan_hall_scf.irp.f b/src/scf_utils/roothaan_hall_scf.irp.f index d332a75c..e78630c2 100644 --- a/src/scf_utils/roothaan_hall_scf.irp.f +++ b/src/scf_utils/roothaan_hall_scf.irp.f @@ -277,7 +277,7 @@ END_DOC return endif - if (rcond < 1.d-10) then + if (rcond == 0.d-10) then dim_DIIS = 0 return endif @@ -287,25 +287,12 @@ END_DOC X_vector_DIIS = C_vector_DIIS call dgesv ( dim_DIIS+1 , 1, B_matrix_DIIS, size(B_matrix_DIIS,1), & ipiv , X_vector_DIIS , size(X_vector_DIIS,1), info) -! call dsysvx('N','U',dim_DIIS+1,1, & -! B_matrix_DIIS,size(B_matrix_DIIS,1), & -! AF, size(AF,1), & -! ipiv, & -! C_vector_DIIS,size(C_vector_DIIS,1), & -! X_vector_DIIS,size(X_vector_DIIS,1), & -! rcond, & -! ferr, & -! berr, & -! scratch,size(scratch), & -! iwork, & -! info & -! ) - deallocate(scratch,AF,iwork) + deallocate(scratch,AF,iwork) - if(info < 0) then - stop 'bug in DIIS' - endif + if(info < 0) then + stop 'bug in DIIS' + endif ! Compute extrapolated Fock matrix