mirror of
https://github.com/pfloos/quack
synced 2025-05-06 23:34:42 +02:00
complex Hartree and exchange (does not work)
This commit is contained in:
parent
569cdc2164
commit
685b0c5824
36
src/AOtoMO/complex_Hartree_matrix_AO_basis.f90
Normal file
36
src/AOtoMO/complex_Hartree_matrix_AO_basis.f90
Normal file
@ -0,0 +1,36 @@
|
||||
subroutine complex_Hartree_matrix_AO_basis(nBas,P,ERI,H)
|
||||
|
||||
! Compute Hartree matrix in the AO basis
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: nBas
|
||||
complex*16,intent(in) :: P(nBas,nBas)
|
||||
complex*16,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: mu,nu,la,si
|
||||
|
||||
! Output variables
|
||||
|
||||
complex*16,intent(out) :: H(nBas,nBas)
|
||||
|
||||
H(:,:) = cmplx(0.d0,0.d0,kind=8)
|
||||
|
||||
do si=1,nBas
|
||||
do nu=1,nBas
|
||||
do la=1,nBas
|
||||
do mu=1,nBas
|
||||
H(mu,nu) = H(mu,nu) + P(la,si)*ERI(mu,la,nu,si)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end subroutine
|
||||
|
||||
! ---
|
39
src/AOtoMO/complex_exchange_matrix_AO_basis.f90
Normal file
39
src/AOtoMO/complex_exchange_matrix_AO_basis.f90
Normal file
@ -0,0 +1,39 @@
|
||||
subroutine complex_exchange_matrix_AO_basis(nBas,P,ERI,K)
|
||||
|
||||
! Compute exchange matrix in the AO basis
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: nBas
|
||||
complex*16,intent(in) :: P(nBas,nBas)
|
||||
complex*16,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
integer :: mu,nu,la,si
|
||||
|
||||
! Output variables
|
||||
|
||||
complex*16,intent(out) :: K(nBas,nBas)
|
||||
|
||||
K(:,:) = cmplx(0.d0,0.d0,kind=8)
|
||||
|
||||
do nu=1,nBas
|
||||
do si=1,nBas
|
||||
do la=1,nBas
|
||||
do mu=1,nBas
|
||||
K(mu,nu) = K(mu,nu) - P(la,si)*ERI(mu,la,si,nu)
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end subroutine
|
||||
|
||||
! ---
|
||||
|
||||
|
||||
|
@ -122,13 +122,10 @@ subroutine cRHF(dotest,maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,r
|
||||
|
||||
! Build Fock matrix
|
||||
|
||||
call Hartree_matrix_AO_basis(nBas,P,ERI,J)
|
||||
call exchange_matrix_AO_basis(nBas,P,ERI,K)
|
||||
call complex_Hartree_matrix_AO_basis(nBas,P,ERI,J)
|
||||
call complex_exchange_matrix_AO_basis(nBas,P,ERI,K)
|
||||
|
||||
F(:,:) = Hc(:,:) + J(:,:) + 0.5d0*K(:,:)
|
||||
write(*,*) "F"
|
||||
write(*,*) F(1,2)
|
||||
write(*,*) F(2,1)
|
||||
|
||||
! Check convergence
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user