mirror of
https://github.com/pfloos/quack
synced 2025-01-03 01:55:57 +01:00
correcting bug in MOM
This commit is contained in:
parent
bd44ad4ffb
commit
b05d50eaa6
@ -1,5 +1,5 @@
|
|||||||
# RHF UHF MOM
|
# RHF UHF MOM
|
||||||
T F F
|
T F T
|
||||||
# MP2 MP3 MP2-F12
|
# MP2 MP3 MP2-F12
|
||||||
F F F
|
F F F
|
||||||
# CCD CCSD CCSD(T)
|
# CCD CCSD CCSD(T)
|
||||||
|
@ -19,6 +19,7 @@ subroutine MOM(maxSCF,thresh,max_diis,nBas,nO,S,T,V,Hc,ERI,X,ENuc,ERHF,c,e,P)
|
|||||||
integer :: iBas,jBas
|
integer :: iBas,jBas
|
||||||
integer :: nSCF,nBasSq,n_diis
|
integer :: nSCF,nBasSq,n_diis
|
||||||
double precision :: ET,EV,EJ,EK,Conv,Gap
|
double precision :: ET,EV,EJ,EK,Conv,Gap
|
||||||
|
double precision :: rcond
|
||||||
double precision,external :: trace_matrix
|
double precision,external :: trace_matrix
|
||||||
double precision,allocatable :: error(:,:),error_diis(:,:),F_diis(:,:)
|
double precision,allocatable :: error(:,:),error_diis(:,:),F_diis(:,:)
|
||||||
double precision,allocatable :: J(:,:),K(:,:),cp(:,:),F(:,:),Fp(:,:)
|
double precision,allocatable :: J(:,:),K(:,:),cp(:,:),F(:,:),Fp(:,:)
|
||||||
@ -111,7 +112,11 @@ subroutine MOM(maxSCF,thresh,max_diis,nBas,nO,S,T,V,Hc,ERI,X,ENuc,ERHF,c,e,P)
|
|||||||
! DIIS extrapolation
|
! DIIS extrapolation
|
||||||
|
|
||||||
n_diis = min(n_diis+1,max_diis)
|
n_diis = min(n_diis+1,max_diis)
|
||||||
call DIIS_extrapolation(nBasSq,nBasSq,n_diis,error_diis,F_diis,error,F)
|
call DIIS_extrapolation(rcond,nBasSq,nBasSq,n_diis,error_diis,F_diis,error,F)
|
||||||
|
|
||||||
|
! Reset DIIS if required
|
||||||
|
|
||||||
|
if(abs(rcond) < 1d-15) n_diis = 0
|
||||||
|
|
||||||
! Diagonalize Fock matrix
|
! Diagonalize Fock matrix
|
||||||
|
|
||||||
|
@ -34,8 +34,6 @@ subroutine RHF(maxSCF,thresh,max_diis,guess_type,nBas,nO,S,T,V,Hc,ERI,X,ENuc,ERH
|
|||||||
double precision,allocatable :: Fp(:,:)
|
double precision,allocatable :: Fp(:,:)
|
||||||
double precision,allocatable :: ON(:)
|
double precision,allocatable :: ON(:)
|
||||||
|
|
||||||
integer :: i
|
|
||||||
|
|
||||||
! Output variables
|
! Output variables
|
||||||
|
|
||||||
double precision,intent(out) :: ERHF
|
double precision,intent(out) :: ERHF
|
||||||
|
Loading…
Reference in New Issue
Block a user