mirror of
https://github.com/pfloos/quack
synced 2024-12-23 04:43:42 +01:00
add MP module
This commit is contained in:
parent
a2ab1fa782
commit
95807231fe
69
src/MP/MP.f90
Normal file
69
src/MP/MP.f90
Normal file
@ -0,0 +1,69 @@
|
||||
subroutine MP(doMP2,doMP3,unrestricted,regularize,nBas,nC,nO,nV,nR,ERI,ERI_aaaa,ERI_aabb,ERI_bbbb,ENuc,EHF,epsHF)
|
||||
|
||||
! Moller-Plesset module
|
||||
|
||||
implicit none
|
||||
include 'parameters.h'
|
||||
|
||||
! Input variables
|
||||
|
||||
logical,intent(in) :: doMP2
|
||||
logical,intent(in) :: doMP3
|
||||
logical,intent(in) :: unrestricted
|
||||
|
||||
logical,intent(in) :: regularize
|
||||
integer,intent(in) :: nBas
|
||||
integer,intent(in) :: nC(nspin)
|
||||
integer,intent(in) :: nO(nspin)
|
||||
integer,intent(in) :: nV(nspin)
|
||||
integer,intent(in) :: nR(nspin)
|
||||
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)
|
||||
double precision,intent(in) :: ERI_aaaa(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ERI_aabb(nBas,nBas,nBas,nBas)
|
||||
double precision,intent(in) :: ERI_bbbb(nBas,nBas,nBas,nBas)
|
||||
|
||||
! Local variables
|
||||
|
||||
! Output variables
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Compute MP3 energy
|
||||
!------------------------------------------------------------------------
|
||||
|
||||
if(doMP2) then
|
||||
|
||||
if(unrestricted) then
|
||||
|
||||
call UMP2(nBas,nC,nO,nV,nR,ERI_aaaa,ERI_aabb,ERI_bbbb,ENuc,EHF,epsHF)
|
||||
|
||||
else
|
||||
|
||||
call MP2(regularize,nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
|
||||
|
||||
end if
|
||||
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Compute MP3 energy
|
||||
!------------------------------------------------------------------------
|
||||
|
||||
if(doMP3) then
|
||||
|
||||
if(unrestricted) then
|
||||
|
||||
write(*,*) 'MP3 NYI for UHF reference'
|
||||
stop
|
||||
|
||||
else
|
||||
|
||||
call MP3(nBas,nC,nO,nV,nR,ERI,ENuc,EHF,epsHF)
|
||||
|
||||
end if
|
||||
|
||||
end if
|
||||
|
||||
end subroutine
|
@ -7,7 +7,7 @@ program QuAcK
|
||||
logical :: doHF,doRHF,doUHF,doRMOM,doUMOM
|
||||
logical :: dostab
|
||||
logical :: doKS
|
||||
logical :: doMP2,doMP3
|
||||
logical :: doMP,doMP2,doMP3
|
||||
logical :: doCCD,dopCCD,doDCD,doCCSD,doCCSDT
|
||||
logical :: do_drCCD,do_rCCD,do_crCCD,do_lCCD
|
||||
logical :: doCIS,doCIS_D,doCID,doCISD,doFCI
|
||||
@ -229,7 +229,7 @@ program QuAcK
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! KS module
|
||||
! Kohn-Sham module
|
||||
!------------------------------------------------------------------------
|
||||
|
||||
if(doKS) then
|
||||
@ -360,23 +360,15 @@ program QuAcK
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Compute MP2 energy
|
||||
! Moller-Plesset module
|
||||
!------------------------------------------------------------------------
|
||||
|
||||
if(doMP2) then
|
||||
doMP = doMP2 .or. doMP3
|
||||
|
||||
if(doMP) then
|
||||
|
||||
call cpu_time(start_MP)
|
||||
|
||||
if(unrestricted) then
|
||||
|
||||
call UMP2(nBas,nC,nO,nV,nR,ERI_MO_aaaa,ERI_MO_aabb,ERI_MO_bbbb,ENuc,EHF,epsHF)
|
||||
|
||||
else
|
||||
|
||||
call MP2(regMP,nBas,nC,nO,nV,nR,ERI_MO,ENuc,EHF,epsHF)
|
||||
|
||||
end if
|
||||
|
||||
call MP(doMP2,doMP3,unrestricted,regMP,nBas,nC,nO,nV,nR,ERI_MO,ENuc,EHF,epsHF)
|
||||
call cpu_time(end_MP)
|
||||
|
||||
t_MP = end_MP - start_MP
|
||||
@ -385,33 +377,6 @@ program QuAcK
|
||||
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Compute MP3 energy
|
||||
!------------------------------------------------------------------------
|
||||
|
||||
if(doMP3) then
|
||||
|
||||
call cpu_time(start_MP)
|
||||
|
||||
if(unrestricted) then
|
||||
|
||||
write(*,*) 'MP3 NYI for UHF reference'
|
||||
stop
|
||||
|
||||
else
|
||||
|
||||
call MP3(nBas,nC,nO,nV,nR,ERI_MO,ENuc,EHF,epsHF)
|
||||
|
||||
end if
|
||||
|
||||
call cpu_time(end_MP)
|
||||
|
||||
t_MP = end_MP - start_MP
|
||||
write(*,'(A65,1X,F9.3,A8)') 'Total CPU time for MP3 = ',t_MP,' seconds'
|
||||
write(*,*)
|
||||
|
||||
end if
|
||||
|
||||
!------------------------------------------------------------------------
|
||||
! Perform CCD calculation
|
||||
!------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user