mirror of
https://github.com/pfloos/quack
synced 2025-01-03 01:55:57 +01:00
RHF earch seems to work
This commit is contained in:
parent
3b958f5610
commit
67abf13740
@ -13,6 +13,6 @@
|
|||||||
# G0F2 evGF2 qsGF2 G0F3 evGF3
|
# G0F2 evGF2 qsGF2 G0F3 evGF3
|
||||||
F F F F F
|
F F F F F
|
||||||
# G0W0 evGW qsGW SRG-qsGW ufG0W0 ufGW
|
# G0W0 evGW qsGW SRG-qsGW ufG0W0 ufGW
|
||||||
T F F F F F
|
F F F F F F
|
||||||
# G0T0pp evGTpp qsGTpp G0T0eh evGTeh qsGTeh
|
# G0T0pp evGTpp qsGTpp G0T0eh evGTeh qsGTeh
|
||||||
F F F F F F
|
F F F F F F
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# HF: maxSCF thresh DIIS guess mix_guess level_shift stab search
|
# HF: maxSCF thresh DIIS guess mix shift stab search
|
||||||
1000 0.00001 5 1 0.0 0.0 T T
|
1000 0.0000001 5 1 0.0 0.0 F T
|
||||||
# MP: reg
|
# MP: reg
|
||||||
F
|
F
|
||||||
# CC: maxSCF thresh DIIS
|
# CC: maxSCF thresh DIIS
|
||||||
|
@ -41,7 +41,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
|||||||
integer :: nS
|
integer :: nS
|
||||||
|
|
||||||
integer,parameter :: maxS = 20
|
integer,parameter :: maxS = 20
|
||||||
integer :: ia,i,a
|
integer :: ia,i,a,mu
|
||||||
integer :: ispin
|
integer :: ispin
|
||||||
|
|
||||||
double precision,allocatable :: Aph(:,:)
|
double precision,allocatable :: Aph(:,:)
|
||||||
@ -51,8 +51,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
|||||||
double precision,allocatable :: R(:,:)
|
double precision,allocatable :: R(:,:)
|
||||||
|
|
||||||
integer :: eig
|
integer :: eig
|
||||||
double precision :: eigval
|
double precision :: kick,step
|
||||||
double precision,allocatable :: eigvec(:)
|
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
@ -74,8 +73,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
|||||||
!-------------------!
|
!-------------------!
|
||||||
|
|
||||||
nS = (nO - nC)*(nV - nR)
|
nS = (nO - nC)*(nV - nR)
|
||||||
allocate(ERI_MO(nBas,nBas,nBas,nBas),eigvec(nS))
|
allocate(ERI_MO(nBas,nBas,nBas,nBas),Aph(nS,nS),Bph(nS,nS),AB(nS,nS),Om(nS),R(nBas,nBas))
|
||||||
allocate(Aph(nS,nS),Bph(nS,nS),AB(nS,nS),Om(nS),R(nBas,nBas))
|
|
||||||
|
|
||||||
!------------------!
|
!------------------!
|
||||||
! Search algorithm !
|
! Search algorithm !
|
||||||
@ -147,33 +145,20 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
|||||||
write(*,*)
|
write(*,*)
|
||||||
write(*,'(1X,A40,1X)') 'Which one would you like to follow?'
|
write(*,'(1X,A40,1X)') 'Which one would you like to follow?'
|
||||||
read(*,*) eig
|
read(*,*) eig
|
||||||
|
|
||||||
eigval = Om(eig)
|
|
||||||
eigvec(:) = AB(:,eig)
|
|
||||||
|
|
||||||
print*,eigval
|
step = 1d0
|
||||||
call matout(nS,1,eigvec)
|
|
||||||
|
|
||||||
R(:,:) = 0d0
|
do mu=1,nBas
|
||||||
ia = 0
|
ia = 0
|
||||||
do i=nC+1,nO
|
do i=nC+1,nO
|
||||||
do a=nO+1,nBas-nR
|
kick = 0d0
|
||||||
ia = ia + 1
|
do a=nO+1,nBas-nR
|
||||||
R(i,a) = +eigvec(ia)
|
ia = ia + 1
|
||||||
R(a,i) = -eigvec(ia)
|
kick = kick + AB(ia,eig)*c(mu,a)
|
||||||
end do
|
end do
|
||||||
end do
|
c(mu,i) = c(mu,i) + step*kick
|
||||||
|
end do
|
||||||
print*,'rotation matrix'
|
end do
|
||||||
call matout(nBas,nBas,R)
|
|
||||||
|
|
||||||
print*,'old coefficients'
|
|
||||||
call matout(nBas,nBas,c)
|
|
||||||
|
|
||||||
c = c - 0.1d0*matmul(c,R)
|
|
||||||
|
|
||||||
print*,'new coefficients'
|
|
||||||
call matout(nBas,nBas,c)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user