9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 11:33:29 +01:00

DIIS stability

This commit is contained in:
Anthony Scemama 2020-05-25 23:32:23 +02:00
parent 5803482a60
commit a460863632

View File

@ -277,7 +277,7 @@ END_DOC
return return
endif endif
if (rcond < 1.d-10) then if (rcond == 0.d-10) then
dim_DIIS = 0 dim_DIIS = 0
return return
endif endif
@ -287,25 +287,12 @@ END_DOC
X_vector_DIIS = C_vector_DIIS X_vector_DIIS = C_vector_DIIS
call dgesv ( dim_DIIS+1 , 1, B_matrix_DIIS, size(B_matrix_DIIS,1), & call dgesv ( dim_DIIS+1 , 1, B_matrix_DIIS, size(B_matrix_DIIS,1), &
ipiv , X_vector_DIIS , size(X_vector_DIIS,1), info) 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 if(info < 0) then
stop 'bug in DIIS' stop 'bug in DIIS'
endif endif
! Compute extrapolated Fock matrix ! Compute extrapolated Fock matrix