10
1
mirror of https://github.com/pfloos/quack synced 2025-05-06 23:24:58 +02:00

wip: debug orthogonalization

This commit is contained in:
Loris Burth 2025-03-06 15:16:18 +01:00
parent 0fd804d51b
commit 06ef322a39
2 changed files with 4 additions and 3 deletions

View File

@ -99,11 +99,12 @@ subroutine cRHF(dotest,maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,r
call complex_matout(nBas,nBas,c)
write(*,*) "Check if c orthonormal"
call complex_matout(nBas,nBas,matmul(transpose(c),matmul(S,c)))
c = matmul(c,Z)
call complex_orthogonalize_matrix(nBas,matmul(transpose(c),matmul(S,c)),Z)
c = matmul(c,Z)
write(*,*) "Check if c tilde orthonormal"
call complex_matout(nBas,nBas,matmul(transpose(c),matmul(S,c)))
call complex_matout(nBas,nBas,matmul(transpose(Z),matmul(S,Z)))
P(:,:) = 2d0*matmul(c(:,1:nO),transpose(c(:,1:nO)))
! Initialization

View File

@ -45,7 +45,7 @@ subroutine complex_orthogonalize_matrix(nBas,S,X)
enddo
call diag(nBas,Uval, D)
X = matmul(Uvec,matmul(D,conjg(transpose(Uvec))))
X = matmul(Uvec,matmul(D,transpose(Uvec)))
deallocate(Uvec,Uval,D)
end subroutine