mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:42 +01:00
fix bug in T matrix
This commit is contained in:
parent
6e82622670
commit
ede8862d67
@ -1,5 +1,5 @@
|
||||
# RHF UHF KS MOM
|
||||
F F T F
|
||||
T F F F
|
||||
# MP2* MP3 MP2-F12
|
||||
F F F
|
||||
# CCD DCD CCSD CCSD(T)
|
||||
@ -13,9 +13,9 @@
|
||||
# G0F2 evGF2 G0F3 evGF3
|
||||
F F F F
|
||||
# G0W0* evGW* qsGW*
|
||||
T F F
|
||||
# G0T0 evGT qsGT
|
||||
F F F
|
||||
# G0T0 evGT qsGT
|
||||
T F F
|
||||
# MCMP2
|
||||
F
|
||||
# * unrestricted version available
|
||||
|
@ -86,7 +86,7 @@ subroutine linear_response_B_pp(ispin,nBas,nC,nO,nV,nR,nOO,nVV,e,ERI,B_pp)
|
||||
|
||||
end if
|
||||
|
||||
print*,'B pp-matrix'
|
||||
call matout(nVV,nOO,B_pp)
|
||||
! print*,'B pp-matrix'
|
||||
! call matout(nVV,nOO,B_pp)
|
||||
|
||||
end subroutine linear_response_B_pp
|
||||
|
@ -96,7 +96,7 @@ subroutine linear_response_C_pp(ispin,nBas,nC,nO,nV,nR,nOO,nVV,e,ERI,C_pp)
|
||||
|
||||
end if
|
||||
|
||||
print*,'C pp-matrix'
|
||||
call matout(nVV,nVV,C_pp)
|
||||
! print*,'C pp-matrix'
|
||||
! call matout(nVV,nVV,C_pp)
|
||||
|
||||
end subroutine linear_response_C_pp
|
||||
|
@ -96,7 +96,7 @@ subroutine linear_response_D_pp(ispin,nBas,nC,nO,nV,nR,nOO,nVV,e,ERI,D_pp)
|
||||
|
||||
end if
|
||||
|
||||
print*,'D pp-matrix'
|
||||
call matout(nOO,nOO,D_pp)
|
||||
! print*,'D pp-matrix'
|
||||
! call matout(nOO,nOO,D_pp)
|
||||
|
||||
end subroutine linear_response_D_pp
|
||||
|
@ -940,9 +940,9 @@ program QuAcK
|
||||
if(doG0T0) then
|
||||
|
||||
call cpu_time(start_G0T0)
|
||||
call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA, &
|
||||
dBSE,dTDA,evDyn,singlet,triplet,linGW,eta_GW, &
|
||||
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,dipole_int_MO,eHF,eG0T0)
|
||||
call G0T0(doACFDT,exchange_kernel,doXBS,BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet, &
|
||||
linGW,eta_GW,nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
||||
PHF,cHF,eHF,Vxc,eG0T0)
|
||||
call cpu_time(end_G0T0)
|
||||
|
||||
t_G0T0 = end_G0T0 - start_G0T0
|
||||
@ -960,7 +960,8 @@ program QuAcK
|
||||
call cpu_time(start_evGT)
|
||||
call evGT(maxSCF_GW,thresh_GW,n_diis_GW,doACFDT,exchange_kernel,doXBS, &
|
||||
BSE,TDA_W,TDA,dBSE,dTDA,evDyn,singlet,triplet,eta_GW, &
|
||||
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_MO,dipole_int_MO,eHF,eG0T0)
|
||||
nBas,nC,nO,nV,nR,nS,ENuc,ERHF,ERI_AO,ERI_MO,dipole_int_MO, &
|
||||
PHF,cHF,eHF,Vxc,eG0T0)
|
||||
call cpu_time(end_evGT)
|
||||
|
||||
t_evGT = end_evGT - start_evGT
|
||||
|
@ -1,120 +0,0 @@
|
||||
subroutine orthogonalization_matrix(ortho_type,nBas,S,X)
|
||||
|
||||
! Compute the orthogonalization matrix X
|
||||
|
||||
implicit none
|
||||
|
||||
! Input variables
|
||||
|
||||
integer,intent(in) :: nBas,ortho_type
|
||||
double precision,intent(in) :: S(nBas,nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
logical :: debug
|
||||
double precision,allocatable :: UVec(:,:),Uval(:)
|
||||
double precision,parameter :: thresh = 1d-6
|
||||
|
||||
integer :: i
|
||||
|
||||
! Output variables
|
||||
|
||||
double precision,intent(out) :: X(nBas,nBas)
|
||||
|
||||
debug = .false.
|
||||
|
||||
! Type of orthogonalization ortho_type
|
||||
!
|
||||
! 1 = Lowdin
|
||||
! 2 = Canonical
|
||||
! 3 = SVD
|
||||
!
|
||||
|
||||
allocate(Uvec(nBas,nBas),Uval(nBas))
|
||||
|
||||
if(ortho_type == 1) then
|
||||
|
||||
write(*,*)
|
||||
write(*,*) ' Lowdin orthogonalization'
|
||||
write(*,*)
|
||||
|
||||
Uvec = S
|
||||
call diagonalize_matrix(nBas,Uvec,Uval)
|
||||
|
||||
do i=1,nBas
|
||||
|
||||
if(Uval(i) > thresh) then
|
||||
|
||||
Uval(i) = 1d0/sqrt(Uval(i))
|
||||
|
||||
else
|
||||
|
||||
write(*,*) 'Eigenvalue',i,'too small for Lowdin orthogonalization'
|
||||
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
call ADAt(nBas,Uvec,Uval,X)
|
||||
|
||||
elseif(ortho_type == 2) then
|
||||
|
||||
write(*,*)
|
||||
write(*,*) 'Canonical orthogonalization'
|
||||
write(*,*)
|
||||
|
||||
Uvec = S
|
||||
call diagonalize_matrix(nBas,Uvec,Uval)
|
||||
|
||||
do i=1,nBas
|
||||
|
||||
if(Uval(i) > thresh) then
|
||||
|
||||
Uval(i) = 1d0/sqrt(Uval(i))
|
||||
|
||||
else
|
||||
|
||||
write(*,*) ' Eigenvalue',i,'too small for canonical orthogonalization'
|
||||
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
call AD(nBas,Uvec,Uval)
|
||||
X = Uvec
|
||||
|
||||
elseif(ortho_type == 3) then
|
||||
|
||||
write(*,*)
|
||||
write(*,*) ' SVD-based orthogonalization NYI'
|
||||
write(*,*)
|
||||
|
||||
! Uvec = S
|
||||
! call diagonalize_matrix(nBas,Uvec,Uval)
|
||||
|
||||
! do i=1,nBas
|
||||
! if(Uval(i) > thresh) then
|
||||
! Uval(i) = 1d0/sqrt(Uval(i))
|
||||
! else
|
||||
! write(*,*) 'Eigenvalue',i,'too small for canonical orthogonalization'
|
||||
! endif
|
||||
! enddo
|
||||
!
|
||||
! call AD(nBas,Uvec,Uval)
|
||||
! X = Uvec
|
||||
|
||||
endif
|
||||
|
||||
! Print results
|
||||
|
||||
if(debug) then
|
||||
|
||||
write(*,'(A28)') '----------------------'
|
||||
write(*,'(A28)') 'Orthogonalization matrix'
|
||||
write(*,'(A28)') '----------------------'
|
||||
call matout(nBas,nBas,X)
|
||||
write(*,*)
|
||||
|
||||
endif
|
||||
|
||||
end subroutine orthogonalization_matrix
|
@ -57,9 +57,9 @@ subroutine orthogonalization_matrix(ortho_type,nBas,S,X)
|
||||
|
||||
elseif(ortho_type == 2) then
|
||||
|
||||
write(*,*)
|
||||
write(*,*) 'Canonical orthogonalization'
|
||||
write(*,*)
|
||||
! write(*,*)
|
||||
! write(*,*) 'Canonical orthogonalization'
|
||||
! write(*,*)
|
||||
|
||||
Uvec = S
|
||||
call diagonalize_matrix(nBas,Uvec,Uval)
|
||||
@ -83,9 +83,9 @@ subroutine orthogonalization_matrix(ortho_type,nBas,S,X)
|
||||
|
||||
elseif(ortho_type == 3) then
|
||||
|
||||
write(*,*)
|
||||
write(*,*) ' SVD-based orthogonalization NYI'
|
||||
write(*,*)
|
||||
! write(*,*)
|
||||
! write(*,*) ' SVD-based orthogonalization NYI'
|
||||
! write(*,*)
|
||||
|
||||
! Uvec = S
|
||||
! call diagonalize_matrix(nBas,Uvec,Uval)
|
||||
|
Loading…
Reference in New Issue
Block a user