mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-01-09 20:48:41 +01:00
Comment to optimize DIIS
This commit is contained in:
parent
533413277d
commit
2465b1b91d
@ -218,7 +218,7 @@ END_DOC
|
|||||||
scratch(ao_num,ao_num) &
|
scratch(ao_num,ao_num) &
|
||||||
)
|
)
|
||||||
|
|
||||||
! Compute the matrices B and X
|
! Compute the matrices B and X
|
||||||
B_matrix_DIIS(:,:) = 0.d0
|
B_matrix_DIIS(:,:) = 0.d0
|
||||||
do j=1,dim_DIIS
|
do j=1,dim_DIIS
|
||||||
j_DIIS = min(dim_DIIS,mod(iteration_SCF-j,max_dim_DIIS)+1)
|
j_DIIS = min(dim_DIIS,mod(iteration_SCF-j,max_dim_DIIS)+1)
|
||||||
@ -226,7 +226,7 @@ END_DOC
|
|||||||
|
|
||||||
i_DIIS = min(dim_DIIS,mod(iteration_SCF-i,max_dim_DIIS)+1)
|
i_DIIS = min(dim_DIIS,mod(iteration_SCF-i,max_dim_DIIS)+1)
|
||||||
|
|
||||||
! Compute product of two errors vectors
|
! Compute product of two errors vectors
|
||||||
|
|
||||||
call dgemm('N','N',ao_num,ao_num,ao_num, &
|
call dgemm('N','N',ao_num,ao_num,ao_num, &
|
||||||
1.d0, &
|
1.d0, &
|
||||||
@ -235,7 +235,7 @@ END_DOC
|
|||||||
0.d0, &
|
0.d0, &
|
||||||
scratch,size(scratch,1))
|
scratch,size(scratch,1))
|
||||||
|
|
||||||
! Compute Trace
|
! Compute Trace
|
||||||
|
|
||||||
do k=1,ao_num
|
do k=1,ao_num
|
||||||
B_matrix_DIIS(i,j) = B_matrix_DIIS(i,j) + scratch(k,k)
|
B_matrix_DIIS(i,j) = B_matrix_DIIS(i,j) + scratch(k,k)
|
||||||
@ -243,6 +243,17 @@ END_DOC
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
! TODO : Could be simplified (to be checked)
|
||||||
|
!
|
||||||
|
! call dgemm('T','N', &
|
||||||
|
! min(dim_DIIS,iteration_SCF), min(dim_DIIS,iteration_SCF), &
|
||||||
|
! ao_num*ao_num, &
|
||||||
|
! 1.d0, &
|
||||||
|
! error_matrix_DIIS,size(error_matrix_DIIS,1)*size(error_matrix_DIIS,2), &
|
||||||
|
! error_matrix_DIIS,size(error_matrix_DIIS,1)*size(error_matrix_DIIS,2), &
|
||||||
|
! 0.d0, &
|
||||||
|
! B_matrix_DIIS,size(B_matrix_DIIS,1))
|
||||||
|
|
||||||
! Pad B matrix and build the X matrix
|
! Pad B matrix and build the X matrix
|
||||||
|
|
||||||
C_vector_DIIS(:) = 0.d0
|
C_vector_DIIS(:) = 0.d0
|
||||||
|
Loading…
Reference in New Issue
Block a user