mirror of
https://github.com/pfloos/quack
synced 2024-12-22 20:35:36 +01:00
RHF, UHF, and GHF search seem to work
This commit is contained in:
parent
7847710059
commit
925dc64bc8
@ -1,5 +1,5 @@
|
||||
# RHF UHF GHF ROHF
|
||||
F T F F
|
||||
F F T F
|
||||
# MP2 MP3
|
||||
F F
|
||||
# CCD pCCD DCD CCSD CCSD(T)
|
||||
|
@ -85,6 +85,7 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
unstab = .true.
|
||||
guess = 0
|
||||
mix = 0d0
|
||||
|
||||
do while(unstab)
|
||||
|
||||
@ -130,6 +131,7 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
ERI_MO(:,:,:,:) = ERI_MO(:,:,:,:) + ERI_tmp(:,:,:,:)
|
||||
|
||||
deallocate(Ca,Cb,ERI_tmp)
|
||||
call wall_time(end_AOtoMO)
|
||||
|
||||
t_AOtoMO = end_AOtoMO - start_AOtoMO
|
||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for AO to MO transformation = ',t_AOtoMO,' seconds'
|
||||
@ -141,8 +143,8 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
ispin = 3
|
||||
|
||||
call phLR_A(ispin,.false.,nBas,nC,nO,nV,nR,nS,1d0,e,ERI_MO,Aph)
|
||||
call phLR_B(ispin,.false.,nBas,nC,nO,nV,nR,nS,1d0,ERI_MO,Bph)
|
||||
call phLR_A(ispin,.false.,nBas2,nC,nO,nV,nR,nS,1d0,e,ERI_MO,Aph)
|
||||
call phLR_B(ispin,.false.,nBas2,nC,nO,nV,nR,nS,1d0,ERI_MO,Bph)
|
||||
|
||||
AB(:,:) = Aph(:,:) + Bph(:,:)
|
||||
|
||||
@ -165,6 +167,7 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Too bad, GHF solution is unstable!'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Largest negative eigenvalue:',Om(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(GHF) = ',EHF,' au'
|
||||
write(*,*)
|
||||
write(*,'(1X,A40,1X,A10)') 'Which one would you like to follow?','[Exit:0]'
|
||||
read(*,*) eig
|
||||
@ -179,11 +182,11 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
step = 1d0
|
||||
|
||||
do mu=1,nBas
|
||||
do mu=1,nBas2
|
||||
ia = 0
|
||||
do i=nC+1,nO
|
||||
kick = 0d0
|
||||
do a=nO+1,nBas-nR
|
||||
do a=nO+1,nBas2-nR
|
||||
ia = ia + 1
|
||||
kick = kick + AB(ia,eig)*c(mu,a)
|
||||
end do
|
||||
@ -195,6 +198,7 @@ subroutine GHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Well done, GHF solution is stable!'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Smallest eigenvalue: ',Om(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(GHF) = ',EHF,' au'
|
||||
|
||||
unstab = .false.
|
||||
|
||||
|
@ -141,6 +141,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Too bad, RHF solution is unstable!'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Largest negative eigenvalue:',Om(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(RHF) = ',EHF,' au'
|
||||
write(*,*)
|
||||
write(*,'(1X,A40,1X,A10)') 'Which one would you like to follow?','[Exit:0]'
|
||||
read(*,*) eig
|
||||
@ -171,6 +172,7 @@ subroutine RHF_search(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rN
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Well done, RHF solution is stable!'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Smallest eigenvalue: ',Om(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(RHF) = ',EHF,' au'
|
||||
|
||||
unstab = .false.
|
||||
|
||||
|
@ -161,7 +161,8 @@ subroutine UHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
if(minval(Om_sc(:)) < 0d0) then
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Too bad, UHF solution is unstable!'
|
||||
write(*,'(1X,A40,1X,F10.6,A3)') 'Largest negative eigenvalue:',Om_sc(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Largest negative eigenvalue:',Om_sc(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(UHF) = ',EHF,' au'
|
||||
write(*,*)
|
||||
write(*,'(1X,A40,1X,A10)') 'Which one would you like to follow?','[Exit:0]'
|
||||
read(*,*) eig
|
||||
@ -208,6 +209,7 @@ subroutine UHF_search(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNu
|
||||
|
||||
write(*,'(1X,A40,1X)') 'Well done, UHF solution is stable!'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'Smallest eigenvalue: ',Om_sc(1),' au'
|
||||
write(*,'(1X,A40,1X,F15.10,A3)') 'E(UHF) = ',EHF,' au'
|
||||
|
||||
unstab = .false.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user