diff --git a/src/HF/GHF.f90 b/src/HF/GHF.f90 index 00967f8..a32dcc7 100644 --- a/src/HF/GHF.f90 +++ b/src/HF/GHF.f90 @@ -1,4 +1,4 @@ -subroutine GHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & +subroutine GHF(doGtest,maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nBas2,nO,Ov,T,V,Hc,ERI,dipole_int,Or,EHF,e,c,P) ! Perform unrestricted Hartree-Fock calculation @@ -8,6 +8,8 @@ subroutine GHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc, ! Input variables + logical,intent(in) :: doGtest + integer,intent(in) :: maxSCF integer,intent(in) :: max_diis integer,intent(in) :: guess_type @@ -294,4 +296,10 @@ subroutine GHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc, call print_GHF(nBas,nBas2,nO,e,C,P,ENuc,ET,EV,EJ,EK,EHF,dipole) +! Print test values + + if(doGtest) then + + end if + end subroutine diff --git a/src/HF/RHF.f90 b/src/HF/RHF.f90 index 8a9e096..96cd7f2 100644 --- a/src/HF/RHF.f90 +++ b/src/HF/RHF.f90 @@ -1,4 +1,4 @@ -subroutine RHF(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc, & +subroutine RHF(doRtest,maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI,dipole_int,X,EHF,e,c,P) ! Perform restricted Hartree-Fock calculation @@ -8,6 +8,8 @@ subroutine RHF(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc ! Input variables + logical,intent(in) :: doRtest + integer,intent(in) :: maxSCF integer,intent(in) :: max_diis integer,intent(in) :: guess_type @@ -199,4 +201,10 @@ subroutine RHF(maxSCF,thresh,max_diis,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc call dipole_moment(nBas,P,nNuc,ZNuc,rNuc,dipole_int,dipole) call print_RHF(nBas,nO,e,C,ENuc,ET,EV,EJ,EK,EHF,dipole) +! Print test values + + if(doRtest) then + + end if + end subroutine diff --git a/src/HF/ROHF.f90 b/src/HF/ROHF.f90 index bee532a..f37b853 100644 --- a/src/HF/ROHF.f90 +++ b/src/HF/ROHF.f90 @@ -1,4 +1,4 @@ -subroutine ROHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & +subroutine ROHF(doRtest,maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI,dipole_int,X,EHF,e,c,Ptot) ! Perform restricted open-shell Hartree-Fock calculation @@ -8,6 +8,8 @@ subroutine ROHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc ! Input variables + logical,intent(in) :: doRtest + integer,intent(in) :: maxSCF integer,intent(in) :: max_diis integer,intent(in) :: guess_type @@ -241,4 +243,10 @@ subroutine ROHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc call dipole_moment(nBas,Ptot,nNuc,ZNuc,rNuc,dipole_int,dipole) call print_ROHF(nBas,nO,e,c,ENuc,ET,EV,EJ,Ex,EHF,dipole) +! Print test values + + if(doRtest) then + + end if + end subroutine diff --git a/src/HF/UHF.f90 b/src/HF/UHF.f90 index 9cee38a..89e8539 100644 --- a/src/HF/UHF.f90 +++ b/src/HF/UHF.f90 @@ -1,4 +1,4 @@ -subroutine UHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & +subroutine UHF(doUtest,maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI,dipole_int,X,EHF,e,c,P) ! Perform unrestricted Hartree-Fock calculation @@ -8,6 +8,8 @@ subroutine UHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc, ! Input variables + logical,intent(in) :: doUtest + integer,intent(in) :: maxSCF integer,intent(in) :: max_diis integer,intent(in) :: guess_type @@ -251,4 +253,11 @@ subroutine UHF(maxSCF,thresh,max_diis,guess_type,mix,level_shift,nNuc,ZNuc,rNuc, call dipole_moment(nBas,P(:,:,1)+P(:,:,2),nNuc,ZNuc,rNuc,dipole_int,dipole) call print_UHF(nBas,nO,S,e,c,ENuc,ET,EV,EJ,Ex,EHF,dipole) + +! Print test values + + if(doUtest) then + + end if + end subroutine diff --git a/src/QuAcK/GQuAcK.f90 b/src/QuAcK/GQuAcK.f90 index 2d1f0f2..35ba25e 100644 --- a/src/QuAcK/GQuAcK.f90 +++ b/src/QuAcK/GQuAcK.f90 @@ -1,14 +1,16 @@ -subroutine GQuAcK(doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA, & - doG0W0,doevGW,doqsGW,doG0F2,doevGF2,doqsGF2, & - nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc,S,T,V,Hc,X,dipole_int_AO,ERI_AO, & - maxSCF_HF,max_diis_HF,thresh_HF,level_shift,guess_type,mix,reg_MP, & - TDA,maxSCF_GF,max_diis_GF,thresh_GF,lin_GF,reg_GF,eta_GF, & - maxSCF_GW,max_diis_GW,thresh_GW,TDA_W,lin_GW,reg_GW,eta_GW, & +subroutine GQuAcK(doGtest,doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA, & + doG0W0,doevGW,doqsGW,doG0F2,doevGF2,doqsGF2, & + nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc,S,T,V,Hc,X,dipole_int_AO,ERI_AO, & + maxSCF_HF,max_diis_HF,thresh_HF,level_shift,guess_type,mix,reg_MP, & + TDA,maxSCF_GF,max_diis_GF,thresh_GF,lin_GF,reg_GF,eta_GF, & + maxSCF_GW,max_diis_GW,thresh_GW,TDA_W,lin_GW,reg_GW,eta_GW, & dophBSE,dophBSE2,doppBSE,dBSE,dTDA,doACFDT,exchange_kernel,doXBS) implicit none include 'parameters.h' + logical,intent(in) :: doGtest + logical,intent(in) :: doGHF logical,intent(in) :: dostab logical,intent(in) :: dosearch @@ -101,7 +103,7 @@ subroutine GQuAcK(doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA, if(doGHF) then call wall_time(start_HF) - call GHF(maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & + call GHF(doGtest,maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nBas2,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,EHF,epsHF,cHF,PHF) call wall_time(end_HF) diff --git a/src/QuAcK/QuAcK.f90 b/src/QuAcK/QuAcK.f90 index 543d206..f2fec95 100644 --- a/src/QuAcK/QuAcK.f90 +++ b/src/QuAcK/QuAcK.f90 @@ -66,6 +66,8 @@ program QuAcK logical :: dophBSE,dophBSE2,doppBSE,dBSE,dTDA logical :: doACFDT,exchange_kernel,doXBS + logical :: doRtest,doUtest,doGtest + !-------------! ! Hello World ! !-------------! @@ -101,7 +103,8 @@ program QuAcK doG0W0,doevGW,doqsGW,doSRGqsGW, & doufG0W0,doufGW, & doG0T0pp,doevGTpp,doqsGTpp, & - doG0T0eh,doevGTeh,doqsGTeh) + doG0T0eh,doevGTeh,doqsGTeh, & + doRtest,doUtest,doGtest) !--------------------------! ! Read options for methods ! @@ -185,7 +188,7 @@ program QuAcK !-------------------------! if(doRQuAcK) & - call RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & + call RQuAcK(doRtest,doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & dodrCCD,dorCCD,docrCCD,dolCCD,doCIS,doCIS_D,doCID,doCISD,doFCI,dophRPA,dophRPAx,docrRPA,doppRPA, & doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW, & doG0T0pp,doevGTpp,doqsGTpp,doG0T0eh,doevGTeh,doqsGTeh,nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc, & @@ -200,7 +203,7 @@ program QuAcK !---------------------------! if(doUQuAcK) & - call UQuAcK(doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & + call UQuAcK(doUtest,doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & dodrCCD,dorCCD,docrCCD,dolCCD,doCIS,doCIS_D,doCID,doCISD,doFCI,dophRPA,dophRPAx,docrRPA,doppRPA, & doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW, & doG0T0pp,doevGTpp,doqsGTpp,doG0T0eh,doevGTeh,doqsGTeh,nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc, & @@ -215,7 +218,7 @@ program QuAcK !--------------------------! if(doGQuAcK) & - call GQuAcK(doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA, & + call GQuAcK(doGtest,doGHF,dostab,dosearch,doMP2,doMP3,dophRPA,dophRPAx,doppRPA, & doG0W0,doevGW,doqsGW,doG0F2,doevGF2,doqsGF2, & nNuc,nBas,sum(nC),sum(nO),sum(nV),sum(nR),ENuc,ZNuc,rNuc,S,T,V,Hc,X,dipole_int_AO,ERI_AO, & maxSCF_HF,max_diis_HF,thresh_HF,level_shift,guess_type,mix,reg_MP, & diff --git a/src/QuAcK/RQuAcK.f90 b/src/QuAcK/RQuAcK.f90 index 7a69992..d6993a6 100644 --- a/src/QuAcK/RQuAcK.f90 +++ b/src/QuAcK/RQuAcK.f90 @@ -1,4 +1,4 @@ -subroutine RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & +subroutine RQuAcK(doRtest,doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & dodrCCD,dorCCD,docrCCD,dolCCD,doCIS,doCIS_D,doCID,doCISD,doFCI,dophRPA,dophRPAx,docrRPA,doppRPA, & doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW, & doG0T0pp,doevGTpp,doqsGTpp,doG0T0eh,doevGTeh,doqsGTeh,nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc, & @@ -13,6 +13,8 @@ subroutine RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,do implicit none include 'parameters.h' + logical,intent(in) :: doRtest + logical,intent(in) :: doRHF,doROHF logical,intent(in) :: dostab logical,intent(in) :: dosearch @@ -115,7 +117,7 @@ subroutine RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,do if(doRHF) then call wall_time(start_HF) - call RHF(maxSCF_HF,thresh_HF,max_diis_HF,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc, & + call RHF(doRtest,maxSCF_HF,thresh_HF,max_diis_HF,guess_type,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,EHF,epsHF,cHF,PHF) call wall_time(end_HF) @@ -128,7 +130,7 @@ subroutine RQuAcK(doRHF,doROHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,do if(doROHF) then call wall_time(start_HF) - call ROHF(maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & + call ROHF(doRtest,maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,EHF,epsHF,cHF,PHF) call wall_time(end_HF) diff --git a/src/QuAcK/UQuAcK.f90 b/src/QuAcK/UQuAcK.f90 index b764366..4927ec8 100644 --- a/src/QuAcK/UQuAcK.f90 +++ b/src/QuAcK/UQuAcK.f90 @@ -1,4 +1,4 @@ -subroutine UQuAcK(doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & +subroutine UQuAcK(doUtest,doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,doCCSDT, & dodrCCD,dorCCD,docrCCD,dolCCD,doCIS,doCIS_D,doCID,doCISD,doFCI,dophRPA,dophRPAx,docrRPA,doppRPA, & doG0F2,doevGF2,doqsGF2,doG0F3,doevGF3,doG0W0,doevGW,doqsGW,doufG0W0,doufGW,doSRGqsGW, & doG0T0pp,doevGTpp,doqsGTpp,doG0T0eh,doevGTeh,doqsGTeh,nNuc,nBas,nC,nO,nV,nR,ENuc,ZNuc,rNuc, & @@ -11,6 +11,8 @@ subroutine UQuAcK(doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,do implicit none include 'parameters.h' + logical,intent(in) :: doUtest + logical,intent(in) :: doUHF logical,intent(in) :: dostab logical,intent(in) :: dosearch @@ -114,7 +116,7 @@ subroutine UQuAcK(doUHF,dostab,dosearch,doMP2,doMP3,doCCD,dopCCD,doDCD,doCCSD,do if(doUHF) then call wall_time(start_HF) - call UHF(maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & + call UHF(doUtest,maxSCF_HF,thresh_HF,max_diis_HF,guess_type,mix,level_shift,nNuc,ZNuc,rNuc,ENuc, & nBas,nO,S,T,V,Hc,ERI_AO,dipole_int_AO,X,EHF,epsHF,cHF,PHF) call wall_time(end_HF) diff --git a/src/QuAcK/read_methods.f90 b/src/QuAcK/read_methods.f90 index f20abcc..dafa77e 100644 --- a/src/QuAcK/read_methods.f90 +++ b/src/QuAcK/read_methods.f90 @@ -9,7 +9,8 @@ subroutine read_methods(doRHF,doUHF,doGHF,doROHF, & doG0W0,doevGW,doqsGW,doSRGqsGW, & doufG0W0,doufGW, & doG0T0pp,doevGTpp,doqsGTpp, & - doG0T0eh,doevGTeh,doqsGTeh) + doG0T0eh,doevGTeh,doqsGTeh, & + doRtest,doUtest,doGtest) ! Read desired methods @@ -28,6 +29,8 @@ subroutine read_methods(doRHF,doUHF,doGHF,doROHF, & logical,intent(out) :: doG0T0pp,doevGTpp,doqsGTpp logical,intent(out) :: doG0T0eh,doevGTeh,doqsGTeh + logical,intent(out) :: doRtest,doUtest,doGtest + ! Local variables character(len=1) :: ans1,ans2,ans3,ans4,ans5,ans6 @@ -173,7 +176,19 @@ subroutine read_methods(doRHF,doUHF,doGHF,doROHF, & if(ans5 == 'T') doevGTeh = .true. if(ans6 == 'T') doqsGTeh = .true. -! Close file with geometry specification +! Read test + + doRtest = .false. + doUtest = .false. + doGtest = .false. + + read(1,*) + read(1,*) ans1,ans2,ans3 + if(ans1 == 'T') doRtest = .true. + if(ans2 == 'T') doUtest = .true. + if(ans3 == 'T') doGtest = .true. + +! Close file close(unit=1) diff --git a/src/test/Gtest.f90 b/src/test/Gtest.f90 new file mode 100755 index 0000000..008794c --- /dev/null +++ b/src/test/Gtest.f90 @@ -0,0 +1,19 @@ +subroutine Gtest() + + implicit none + +! Input variables + +! Local variables + +! Output variables + +write(*,*) '*****************************************' +write(*,*) '* Testing Generalized Branch of QuAcK...*' +write(*,*) '*****************************************' + +write(*,*) '***************************' +write(*,*) '* End of Generalized Test *' +write(*,*) '***************************' + +end subroutine diff --git a/src/test/Rtest.f90 b/src/test/Rtest.f90 new file mode 100755 index 0000000..6d69324 --- /dev/null +++ b/src/test/Rtest.f90 @@ -0,0 +1,19 @@ +subroutine Rtest() + + implicit none + +! Input variables + +! Local variables + +! Output variables + +write(*,*) '****************************************' +write(*,*) '* Testing Restricted Branch of QuAcK...*' +write(*,*) '****************************************' + +write(*,*) '**************************' +write(*,*) '* End of Restricted Test *' +write(*,*) '**************************' + +end subroutine diff --git a/src/test/Utest.f90 b/src/test/Utest.f90 new file mode 100755 index 0000000..e96450c --- /dev/null +++ b/src/test/Utest.f90 @@ -0,0 +1,19 @@ +subroutine Utest() + + implicit none + +! Input variables + +! Local variables + +! Output variables + +write(*,*) '******************************************' +write(*,*) '* Testing Unrestricted Branch of QuAcK...*' +write(*,*) '******************************************' + +write(*,*) '****************************' +write(*,*) '* End of Unrestricted Test *' +write(*,*) '****************************' + +end subroutine diff --git a/test/test_QuAcK.sh b/test/test_QuAcK.sh deleted file mode 100755 index dec2f2d..0000000 --- a/test/test_QuAcK.sh +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/bash - -echo -echo '**********************' -echo '* Running QuAcK Test *' -echo '**********************' -echo -echo 'Testing the 3 branches of QuAcK... ' -echo -echo '********************************' -echo '* Testing Restricted Branch ...*' -echo '********************************' -echo -echo '********************************' -echo '* OK With Restricted Branch ...*' -echo '********************************' -echo -echo '***********************************' -echo '* Testing Unrestricted Branch ... *' -echo '***********************************' -echo -echo '***********************************' -echo '* OK With Unrestricted Branch ... *' -echo '***********************************' -echo -echo '**********************************' -echo '* Testing Generalized Branch ... *' -echo '**********************************' -echo -echo '**********************************' -echo '* OK With Generalized Branch ... *' -echo '**********************************' -echo -echo '*********************' -echo '* End of QuAcK Test *' -echo '*********************' -echo -