2023-11-11 23:00:00 +01:00
|
|
|
subroutine GMP(dotest,doMP2,doMP3,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
|
2023-10-26 18:00:16 +02:00
|
|
|
|
|
|
|
! Moller-Plesset module
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2023-11-11 23:00:00 +01:00
|
|
|
logical,intent(in) :: dotest
|
|
|
|
|
2023-10-26 18:00:16 +02:00
|
|
|
logical,intent(in) :: doMP2
|
2023-10-27 13:35:10 +02:00
|
|
|
logical,intent(in) :: doMP3
|
2023-10-26 18:00:16 +02:00
|
|
|
|
|
|
|
logical,intent(in) :: regularize
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nC
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nV
|
|
|
|
integer,intent(in) :: nR
|
|
|
|
double precision,intent(in) :: ENuc
|
|
|
|
double precision,intent(in) :: EHF
|
|
|
|
double precision,intent(in) :: epsHF(nBas)
|
|
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
double precision :: start_MP ,end_MP ,t_MP
|
2023-10-27 13:35:10 +02:00
|
|
|
double precision :: Ec
|
2023-10-26 18:00:16 +02:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MP2 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMP2) then
|
|
|
|
|
|
|
|
call wall_time(start_MP)
|
2023-11-11 23:00:00 +01:00
|
|
|
call GMP2(dotest,regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF,Ec)
|
2023-10-27 13:35:10 +02:00
|
|
|
call wall_time(end_MP)
|
|
|
|
|
|
|
|
t_MP = end_MP - start_MP
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP2 = ',t_MP,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
! Compute MP3 energy
|
|
|
|
!------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if(doMP3) then
|
|
|
|
|
|
|
|
call wall_time(start_MP)
|
|
|
|
call GMP3(nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
|
2023-10-26 18:00:16 +02:00
|
|
|
call wall_time(end_MP)
|
|
|
|
|
|
|
|
t_MP = end_MP - start_MP
|
|
|
|
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP2 = ',t_MP,' seconds'
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
end subroutine
|