4
1
mirror of https://github.com/pfloos/quack synced 2024-12-23 04:43:53 +01:00

rename RMP routines and fix bug

This commit is contained in:
Pierre-Francois Loos 2023-11-11 21:43:35 +01:00
parent 69b76e4a77
commit ef528e6a3c
7 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
# RHF UHF GHF ROHF # RHF UHF GHF ROHF
T T T T T T T T
# MP2 MP3 # MP2 MP3
F F T F
# CCD pCCD DCD CCSD CCSD(T) # CCD pCCD DCD CCSD CCSD(T)
F F F F F F F F F F
# drCCD rCCD crCCD lCCD # drCCD rCCD crCCD lCCD
@ -17,4 +17,4 @@
# G0T0pp evGTpp qsGTpp G0T0eh evGTeh qsGTeh # G0T0pp evGTpp qsGTpp G0T0eh evGTeh qsGTeh
F F F F F F F F F F F F
# Rtest Utest Gtest # Rtest Utest Gtest
T T T F F F

View File

@ -82,7 +82,7 @@ subroutine G0F2(dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,triplet,linearize,eta,regu
! Print results ! Print results
call MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eGF,Ec) call RMP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eGF,Ec)
call print_G0F2(nBas,nO,eHF,SigC,eGF,Z,ENuc,ERHF,Ec) call print_G0F2(nBas,nO,eHF,SigC,eGF,Z,ENuc,ERHF,Ec)
! Perform BSE2 calculation ! Perform BSE2 calculation

View File

@ -107,7 +107,7 @@ subroutine evGF2(dophBSE,doppBSE,TDA,dBSE,dTDA,maxSCF,thresh,max_diis,singlet,tr
! Print results ! Print results
call MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eGF,Ec) call RMP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eGF,Ec)
call print_evGF2(nBas,nO,nSCF,Conv,eHF,SigC,Z,eGF,ENuc,ERHF,Ec) call print_evGF2(nBas,nO,nSCF,Conv,eHF,SigC,Z,eGF,ENuc,ERHF,Ec)
! DIIS extrapolation ! DIIS extrapolation

View File

@ -216,7 +216,7 @@ subroutine qsGF2(maxSCF,thresh,max_diis,dophBSE,doppBSE,TDA,dBSE,dTDA,singlet,tr
! Correlation energy ! Correlation energy
call MP2(regularize,nBas,nC,nO,nV,nR,ERI_MO,ENuc,EqsGF2,eGF,Ec) call RMP2(regularize,nBas,nC,nO,nV,nR,ERI_MO,ENuc,EqsGF2,eGF,Ec)
! Total energy ! Total energy

View File

@ -1,4 +1,4 @@
subroutine RMP(doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF) subroutine RMP(doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF)
! Moller-Plesset module ! Moller-Plesset module
@ -17,8 +17,8 @@ subroutine RMP(doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
integer,intent(in) :: nV(nspin) integer,intent(in) :: nV(nspin)
integer,intent(in) :: nR(nspin) integer,intent(in) :: nR(nspin)
double precision,intent(in) :: ENuc double precision,intent(in) :: ENuc
double precision,intent(in) :: EHF double precision,intent(in) :: ERHF
double precision,intent(in) :: epsHF(nBas) double precision,intent(in) :: eHF(nBas)
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
! Local variables ! Local variables
@ -35,7 +35,7 @@ subroutine RMP(doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
if(doMP2) then if(doMP2) then
call wall_time(start_MP) call wall_time(start_MP)
call MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF,Ec) call RMP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF,Ec)
call wall_time(end_MP) call wall_time(end_MP)
t_MP = end_MP - start_MP t_MP = end_MP - start_MP
@ -51,7 +51,7 @@ subroutine RMP(doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
if(doMP3) then if(doMP3) then
call wall_time(start_MP) call wall_time(start_MP)
write(*,*) 'MP3 NYI for UHF reference' call RMP3(nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF)
call wall_time(end_MP) call wall_time(end_MP)
t_MP = end_MP - start_MP t_MP = end_MP - start_MP

View File

@ -1,4 +1,4 @@
subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2) subroutine RMP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF,EcMP2)
! Perform second-order Moller-Plesset calculation with and without regularizers ! Perform second-order Moller-Plesset calculation with and without regularizers
@ -13,8 +13,8 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
integer,intent(in) :: nV integer,intent(in) :: nV
integer,intent(in) :: nR integer,intent(in) :: nR
double precision,intent(in) :: ENuc double precision,intent(in) :: ENuc
double precision,intent(in) :: EHF double precision,intent(in) :: ERHF
double precision,intent(in) :: e(nBas) double precision,intent(in) :: eHF(nBas)
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas) double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
! Local variables ! Local variables
@ -69,7 +69,7 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
do a=nO+1,nBas-nR do a=nO+1,nBas-nR
do b=nO+1,nBas-nR do b=nO+1,nBas-nR
Dijab = e(a) + e(b) - e(i) - e(j) Dijab = eHF(a) + eHF(b) - eHF(i) - eHF(j)
! Second-order ring diagram ! Second-order ring diagram
@ -111,8 +111,8 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2d write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2d
write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2x write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2x
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',EHF + EcMP2 write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',ERHF + EcMP2
write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + EHF + EcMP2 write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + ERHF + EcMP2
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,*) write(*,*)
@ -130,8 +130,8 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2ds write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2ds
write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xs write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xs
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',EHF + EcsMP2 write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',ERHF + EcsMP2
write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + EHF + EcsMP2 write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + ERHF + EcsMP2
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,*) write(*,*)
@ -147,8 +147,8 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2ds2 write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2ds2
write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xs2 write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xs2
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',EHF + Ecs2MP2 write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',ERHF + Ecs2MP2
write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + EHF + Ecs2MP2 write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + ERHF + Ecs2MP2
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,*) write(*,*)
@ -164,8 +164,8 @@ subroutine MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,e,EcMP2)
write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2dk write(*,'(A32,1X,F16.10)') ' Direct part = ',2d0*E2dk
write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xk write(*,'(A32,1X,F16.10)') ' Exchange part = ',-E2xk
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',EHF + EckMP2 write(*,'(A32,1X,F16.10)') ' MP2 electronic energy = ',ERHF + EckMP2
write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + EHF + EckMP2 write(*,'(A32,1X,F16.10)') ' MP2 total energy = ',ENuc + ERHF + EckMP2
write(*,'(A32)') '--------------------------' write(*,'(A32)') '--------------------------'
write(*,*) write(*,*)

View File

@ -1,4 +1,4 @@
subroutine MP3(nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,EHF,e) subroutine RMP3(nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,EHF,e)
! Perform third-order Moller-Plesset calculation ! Perform third-order Moller-Plesset calculation