From d738e335bada71b388a67e40629b844af11c76b9 Mon Sep 17 00:00:00 2001 From: pfloos Date: Thu, 27 Jul 2023 11:38:38 +0200 Subject: [PATCH] clean up --- src/CC/BCCD.f90 | 2 +- src/CC/CCD.f90 | 2 +- src/CC/CCD_correlation_energy.f90 | 2 +- src/CC/CCGW.f90 | 2 +- src/CC/CCSD.f90 | 2 +- src/CC/CCSDT.f90 | 2 +- src/CC/CCSD_Ec_nc.f90 | 2 +- src/CC/CCSD_correlation_energy.f90 | 2 +- src/CC/DCD.f90 | 2 +- src/CC/DEA_EOM_CCD_2p.f90 | 2 +- src/CC/DIP_EOM_CCD_2h.f90 | 2 +- src/CC/EE_EOM_CCD_1h1p.f90 | 2 +- src/CC/MP3_correlation_energy.f90 | 2 +- src/CC/antisymmetrize_ERI.f90 | 2 +- src/CC/crCCD.f90 | 2 +- src/CC/drCCD.f90 | 2 +- src/CC/form_EOM_one_body.f90 | 2 +- src/CC/form_EOM_two_body.f90 | 2 +- src/CC/form_FB.f90 | 2 +- src/CC/form_T.f90 | 2 +- src/CC/form_X.f90 | 2 +- src/CC/form_abh.f90 | 2 +- src/CC/form_cF_nc.f90 | 2 +- src/CC/form_cW_nc.f90 | 2 +- src/CC/form_crossed_ring_r.f90 | 2 +- src/CC/form_delta_OOOVVV.f90 | 2 +- src/CC/form_delta_OOVV.f90 | 2 +- src/CC/form_delta_OV.f90 | 2 +- src/CC/form_g.f90 | 2 +- src/CC/form_h.f90 | 2 +- src/CC/form_ladder_r.f90 | 2 +- src/CC/form_r1.f90 | 2 +- src/CC/form_r1_nc.f90 | 2 +- src/CC/form_r2.f90 | 2 +- src/CC/form_r2_nc.f90 | 2 +- src/CC/form_ring_r.f90 | 2 +- src/CC/form_tau.f90 | 2 +- src/CC/form_tau_nc.f90 | 2 +- src/CC/form_taus_nc.f90 | 2 +- src/CC/form_u.f90 | 2 +- src/CC/form_ub.f90 | 2 +- src/CC/form_ubb.f90 | 2 +- src/CC/form_v.f90 | 2 +- src/CC/lCCD.f90 | 2 +- src/CC/pCCD.f90 | 2 +- src/CC/rCCD.f90 | 2 +- .../print_unrestricted_transition_vectors.f90 | 4 +- src/LR/unrestricted_S2_expval.f90 | 180 ------------------ src/LR/unrestricted_oscillator_strength.f90 | 2 +- 49 files changed, 49 insertions(+), 229 deletions(-) delete mode 100644 src/LR/unrestricted_S2_expval.f90 diff --git a/src/CC/BCCD.f90 b/src/CC/BCCD.f90 index 2322cb2..3d9c677 100644 --- a/src/CC/BCCD.f90 +++ b/src/CC/BCCD.f90 @@ -233,4 +233,4 @@ subroutine BCCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF, write(*,'(1X,A15,1X,F10.6)') 'Ec(MP4-SDQ) = ',EcMP4 write(*,*) -end subroutine BCCD +end subroutine diff --git a/src/CC/CCD.f90 b/src/CC/CCD.f90 index 8200dc7..5094be1 100644 --- a/src/CC/CCD.f90 +++ b/src/CC/CCD.f90 @@ -272,4 +272,4 @@ subroutine CCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF,e if(do_DIP_EOM_CC_2h) call DIP_EOM_CCD_2h(nC,nO,nV,nR,eO,OOVV,OOOO,t) -end subroutine CCD +end subroutine diff --git a/src/CC/CCD_correlation_energy.f90 b/src/CC/CCD_correlation_energy.f90 index 67c07a3..deb272c 100644 --- a/src/CC/CCD_correlation_energy.f90 +++ b/src/CC/CCD_correlation_energy.f90 @@ -33,4 +33,4 @@ subroutine CCD_correlation_energy(nC,nO,nV,nR,OOVV,t2,EcCCD) EcCCD = 0.25d0*EcCCD -end subroutine CCD_correlation_energy +end subroutine diff --git a/src/CC/CCGW.f90 b/src/CC/CCGW.f90 index 87b8099..80fb8fd 100644 --- a/src/CC/CCGW.f90 +++ b/src/CC/CCGW.f90 @@ -349,4 +349,4 @@ subroutine CCGW(maxSCF,thresh,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,e) enddo write(*,*)'-------------------------------------------------------------------------------' -end subroutine CCGW +end subroutine diff --git a/src/CC/CCSD.f90 b/src/CC/CCSD.f90 index 7707659..4ffb335 100644 --- a/src/CC/CCSD.f90 +++ b/src/CC/CCSD.f90 @@ -302,4 +302,4 @@ subroutine CCSD(maxSCF,thresh,max_diis,doCCSDT,nBasin,nCin,nOin,nVin,nRin,ERI,EN end if -end subroutine CCSD +end subroutine diff --git a/src/CC/CCSDT.f90 b/src/CC/CCSDT.f90 index 5b58b64..c0a63dc 100644 --- a/src/CC/CCSDT.f90 +++ b/src/CC/CCSDT.f90 @@ -42,4 +42,4 @@ subroutine CCSDT(nC,nO,nV,nR,eO,eV,OOVV,VVVO,VOOO,t1,t2,EcCCT) call form_T(nC,nO,nV,nR,delta_OOOVVV,ub,ubb,EcCCT) -end subroutine CCSDT +end subroutine diff --git a/src/CC/CCSD_Ec_nc.f90 b/src/CC/CCSD_Ec_nc.f90 index d6214b0..d40b05f 100644 --- a/src/CC/CCSD_Ec_nc.f90 +++ b/src/CC/CCSD_Ec_nc.f90 @@ -53,4 +53,4 @@ subroutine CCSD_Ec_nc(nO,nV,t1,t2,Fov,OOVV,EcCCSD) end do end do -end subroutine CCSD_Ec_nc +end subroutine diff --git a/src/CC/CCSD_correlation_energy.f90 b/src/CC/CCSD_correlation_energy.f90 index 3a678cb..ace59a4 100644 --- a/src/CC/CCSD_correlation_energy.f90 +++ b/src/CC/CCSD_correlation_energy.f90 @@ -33,4 +33,4 @@ subroutine CCSD_correlation_energy(nC,nO,nV,nR,OOVV,tau,EcCCSD) EcCCSD = 0.5d0*EcCCSD -end subroutine CCSD_correlation_energy +end subroutine diff --git a/src/CC/DCD.f90 b/src/CC/DCD.f90 index aea4af2..e7d856a 100644 --- a/src/CC/DCD.f90 +++ b/src/CC/DCD.f90 @@ -280,4 +280,4 @@ subroutine DCD(maxSCF,thresh,max_diis,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF) endif -end subroutine DCD +end subroutine diff --git a/src/CC/DEA_EOM_CCD_2p.f90 b/src/CC/DEA_EOM_CCD_2p.f90 index 4760530..02efa37 100644 --- a/src/CC/DEA_EOM_CCD_2p.f90 +++ b/src/CC/DEA_EOM_CCD_2p.f90 @@ -113,4 +113,4 @@ subroutine DEA_EOM_CCD_2p(nC,nO,nV,nR,eV,OOVV,VVVV,t) call print_excitation('DEA-EOM-CCD ',3,nVV,Om) -end subroutine DEA_EOM_CCD_2p +end subroutine diff --git a/src/CC/DIP_EOM_CCD_2h.f90 b/src/CC/DIP_EOM_CCD_2h.f90 index 988e5f3..87c9491 100644 --- a/src/CC/DIP_EOM_CCD_2h.f90 +++ b/src/CC/DIP_EOM_CCD_2h.f90 @@ -113,4 +113,4 @@ subroutine DIP_EOM_CCD_2h(nC,nO,nV,nR,eO,OOVV,OOOO,t) call print_excitation('DIP-EOM-CCD ',3,nOO,Om) -end subroutine DIP_EOM_CCD_2h +end subroutine diff --git a/src/CC/EE_EOM_CCD_1h1p.f90 b/src/CC/EE_EOM_CCD_1h1p.f90 index 9ef2200..e6aeeff 100644 --- a/src/CC/EE_EOM_CCD_1h1p.f90 +++ b/src/CC/EE_EOM_CCD_1h1p.f90 @@ -147,4 +147,4 @@ subroutine EE_EOM_CCD_1h1p(nC,nO,nV,nR,eO,eV,OOVV,OVVO,t) end if -end subroutine EE_EOM_CCD_1h1p +end subroutine diff --git a/src/CC/MP3_correlation_energy.f90 b/src/CC/MP3_correlation_energy.f90 index 94f5d54..693013b 100644 --- a/src/CC/MP3_correlation_energy.f90 +++ b/src/CC/MP3_correlation_energy.f90 @@ -35,4 +35,4 @@ subroutine MP3_correlation_energy(nC,nO,nV,nR,OOVV,t2,v,delta_OOVV,EcMP3) EcMP3 = 0.25d0*EcMP3 -end subroutine MP3_correlation_energy +end subroutine diff --git a/src/CC/antisymmetrize_ERI.f90 b/src/CC/antisymmetrize_ERI.f90 index 034c94a..f8e74cc 100644 --- a/src/CC/antisymmetrize_ERI.f90 +++ b/src/CC/antisymmetrize_ERI.f90 @@ -43,4 +43,4 @@ subroutine antisymmetrize_ERI(ispin,nBas,ERI,db_ERI) endif -end subroutine antisymmetrize_ERI +end subroutine diff --git a/src/CC/crCCD.f90 b/src/CC/crCCD.f90 index eb2e0f7..d427ba7 100644 --- a/src/CC/crCCD.f90 +++ b/src/CC/crCCD.f90 @@ -202,4 +202,4 @@ subroutine crCCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF write(*,*)'----------------------------------------------------' write(*,*) -end subroutine crCCD +end subroutine diff --git a/src/CC/drCCD.f90 b/src/CC/drCCD.f90 index 063c4b0..33764d6 100644 --- a/src/CC/drCCD.f90 +++ b/src/CC/drCCD.f90 @@ -195,4 +195,4 @@ subroutine drCCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF write(*,*)'----------------------------------------------------' write(*,*) -end subroutine drCCD +end subroutine diff --git a/src/CC/form_EOM_one_body.f90 b/src/CC/form_EOM_one_body.f90 index 58814e8..77973d6 100644 --- a/src/CC/form_EOM_one_body.f90 +++ b/src/CC/form_EOM_one_body.f90 @@ -103,4 +103,4 @@ subroutine form_EOM_one_body(nO,nV,foo,fov,fvv,t1,t2,OOOV,OOVV,OVVV,cFoo,cFov,cF end do end do -end subroutine form_EOM_one_body +end subroutine diff --git a/src/CC/form_EOM_two_body.f90 b/src/CC/form_EOM_two_body.f90 index cc29837..b25b922 100644 --- a/src/CC/form_EOM_two_body.f90 +++ b/src/CC/form_EOM_two_body.f90 @@ -282,4 +282,4 @@ subroutine form_EOM_two_body(nO,nV,foo,fov,fvv,t1,t2,cFoo,cFov,cFvv, end do end do -end subroutine form_EOM_two_body +end subroutine diff --git a/src/CC/form_FB.f90 b/src/CC/form_FB.f90 index d74f7ee..99cec79 100644 --- a/src/CC/form_FB.f90 +++ b/src/CC/form_FB.f90 @@ -86,4 +86,4 @@ subroutine form_FB(nC,nO,nV,nR,foo,fvv,fov,OOOV,OOVV,OVVV,t,FooB,FvvB,FovB) enddo enddo -end subroutine form_FB +end subroutine diff --git a/src/CC/form_T.f90 b/src/CC/form_T.f90 index 54a47c6..53656c2 100644 --- a/src/CC/form_T.f90 +++ b/src/CC/form_T.f90 @@ -43,4 +43,4 @@ subroutine form_T(nC,nO,nV,nR,delta_OOOVVV,ub,ubb,EcCCT) EcCCT = - EcCCT/36d0 -end subroutine form_T +end subroutine diff --git a/src/CC/form_X.f90 b/src/CC/form_X.f90 index 95cc7bc..8aa82c2 100644 --- a/src/CC/form_X.f90 +++ b/src/CC/form_X.f90 @@ -89,4 +89,4 @@ subroutine form_X(nC,nO,nV,nR,OOVV,t2,X1,X2,X3,X4) enddo enddo -end subroutine form_X +end subroutine diff --git a/src/CC/form_abh.f90 b/src/CC/form_abh.f90 index 5e6300c..45ba628 100644 --- a/src/CC/form_abh.f90 +++ b/src/CC/form_abh.f90 @@ -102,4 +102,4 @@ subroutine form_abh(nC,nO,nV,nR,OOOO,OVOO,OOVV,VVVV,VOVV,OVVO,OVVV,t1,tau,aoooo, end do end do -end subroutine form_abh +end subroutine diff --git a/src/CC/form_cF_nc.f90 b/src/CC/form_cF_nc.f90 index 6ebe8d1..5a65f48 100644 --- a/src/CC/form_cF_nc.f90 +++ b/src/CC/form_cF_nc.f90 @@ -104,4 +104,4 @@ subroutine form_cF_nc(nO,nV,t1,taus,Foo,Fov,Fvv,OOOV,OOVV,OVVV,cFoo,cFov,cFvv) end do end do -end subroutine form_cF_nc +end subroutine diff --git a/src/CC/form_cW_nc.f90 b/src/CC/form_cW_nc.f90 index e9a2d11..de81121 100644 --- a/src/CC/form_cW_nc.f90 +++ b/src/CC/form_cW_nc.f90 @@ -111,4 +111,4 @@ subroutine form_cW_nc(nO,nV,t1,t2,tau,OOOO,OOOV,OOVO,OOVV,OVVO,OVVV,VOVV,VVVV,cW end do -end subroutine form_cW_nc +end subroutine diff --git a/src/CC/form_crossed_ring_r.f90 b/src/CC/form_crossed_ring_r.f90 index 0009e38..495a86f 100644 --- a/src/CC/form_crossed_ring_r.f90 +++ b/src/CC/form_crossed_ring_r.f90 @@ -67,4 +67,4 @@ subroutine form_crossed_ring_r(nC,nO,nV,nR,OVOV,OOVV,t2,r2) end do end do -end subroutine form_crossed_ring_r +end subroutine diff --git a/src/CC/form_delta_OOOVVV.f90 b/src/CC/form_delta_OOOVVV.f90 index e29989d..7069ab3 100644 --- a/src/CC/form_delta_OOOVVV.f90 +++ b/src/CC/form_delta_OOOVVV.f90 @@ -34,4 +34,4 @@ subroutine form_delta_OOOVVV(nC,nO,nV,nR,eO,eV,delta) enddo enddo -end subroutine form_delta_OOOVVV +end subroutine diff --git a/src/CC/form_delta_OOVV.f90 b/src/CC/form_delta_OOVV.f90 index b1ecbfa..8b41e89 100644 --- a/src/CC/form_delta_OOVV.f90 +++ b/src/CC/form_delta_OOVV.f90 @@ -30,4 +30,4 @@ subroutine form_delta_OOVV(nC,nO,nV,nR,eO,eV,delta) enddo enddo -end subroutine form_delta_OOVV +end subroutine diff --git a/src/CC/form_delta_OV.f90 b/src/CC/form_delta_OV.f90 index 565534f..e819511 100644 --- a/src/CC/form_delta_OV.f90 +++ b/src/CC/form_delta_OV.f90 @@ -27,4 +27,4 @@ subroutine form_delta_OV(nC,nO,nV,nR,eO,eV,delta) enddo enddo -end subroutine form_delta_OV +end subroutine diff --git a/src/CC/form_g.f90 b/src/CC/form_g.f90 index b9475d1..4a7b5f4 100644 --- a/src/CC/form_g.f90 +++ b/src/CC/form_g.f90 @@ -50,4 +50,4 @@ subroutine form_g(nC,nO,nV,nR,hvv,hoo,VOVV,OOOV,t1,gvv,goo) end do end do -end subroutine form_g +end subroutine diff --git a/src/CC/form_h.f90 b/src/CC/form_h.f90 index b1405c7..be807fe 100644 --- a/src/CC/form_h.f90 +++ b/src/CC/form_h.f90 @@ -76,4 +76,4 @@ subroutine form_h(nC,nO,nV,nR,eO,eV,OOVV,t1,tau,hvv,hoo,hvo) ! print*,'hvv',hvv -end subroutine form_h +end subroutine diff --git a/src/CC/form_ladder_r.f90 b/src/CC/form_ladder_r.f90 index 678e25f..be5e33a 100644 --- a/src/CC/form_ladder_r.f90 +++ b/src/CC/form_ladder_r.f90 @@ -70,4 +70,4 @@ subroutine form_ladder_r(nC,nO,nV,nR,OOOO,OOVV,VVVV,t2,r2) end do end do -end subroutine form_ladder_r +end subroutine diff --git a/src/CC/form_r1.f90 b/src/CC/form_r1.f90 index 1392c9f..ea40bf5 100644 --- a/src/CC/form_r1.f90 +++ b/src/CC/form_r1.f90 @@ -74,4 +74,4 @@ subroutine form_r1(nC,nO,nV,nR,OVVO,OVVV,OOOV,hvv,hoo,hvo,t1,t2,tau,r1) end do end do -end subroutine form_r1 +end subroutine diff --git a/src/CC/form_r1_nc.f90 b/src/CC/form_r1_nc.f90 index f7a180e..7a8d520 100644 --- a/src/CC/form_r1_nc.f90 +++ b/src/CC/form_r1_nc.f90 @@ -79,4 +79,4 @@ subroutine form_r1_nc(nO,nV,t1,t2,delta_ov,Fov,cFoo,cFov,cFvv,OOVO,OVOV,OVVV,r1) r1(:,:) = delta_ov(:,:)*t1(:,:) - r1(:,:) -end subroutine form_r1_nc +end subroutine diff --git a/src/CC/form_r2.f90 b/src/CC/form_r2.f90 index c0508c3..8ecb389 100644 --- a/src/CC/form_r2.f90 +++ b/src/CC/form_r2.f90 @@ -136,4 +136,4 @@ subroutine form_r2(nC,nO,nV,nR,OOVV,OVOO,OVVV,OVVO,gvv,goo,aoooo,bvvvv,hovvo,t1, end do end do -end subroutine form_r2 +end subroutine diff --git a/src/CC/form_r2_nc.f90 b/src/CC/form_r2_nc.f90 index 9ca8b4d..fe5cab7 100644 --- a/src/CC/form_r2_nc.f90 +++ b/src/CC/form_r2_nc.f90 @@ -106,4 +106,4 @@ subroutine form_r2_nc(nO,nV,t1,t2,tau,delta_oovv,cFoo,cFov,cFvv,cWoooo,cWvvvv,cW r2(:,:,:,:) = delta_oovv(:,:,:,:)*t2(:,:,:,:) - r2(:,:,:,:) -end subroutine form_r2_nc +end subroutine diff --git a/src/CC/form_ring_r.f90 b/src/CC/form_ring_r.f90 index 8b75138..6a386ea 100644 --- a/src/CC/form_ring_r.f90 +++ b/src/CC/form_ring_r.f90 @@ -67,4 +67,4 @@ subroutine form_ring_r(nC,nO,nV,nR,OVVO,OOVV,t2,r2) end do end do -end subroutine form_ring_r +end subroutine diff --git a/src/CC/form_tau.f90 b/src/CC/form_tau.f90 index 918c219..9c6207b 100644 --- a/src/CC/form_tau.f90 +++ b/src/CC/form_tau.f90 @@ -31,4 +31,4 @@ subroutine form_tau(nC,nO,nV,nR,t1,t2,tau) enddo enddo -end subroutine form_tau +end subroutine diff --git a/src/CC/form_tau_nc.f90 b/src/CC/form_tau_nc.f90 index c7f4aaa..4e910c1 100644 --- a/src/CC/form_tau_nc.f90 +++ b/src/CC/form_tau_nc.f90 @@ -31,4 +31,4 @@ subroutine form_tau_nc(nO,nV,t1,t2,tau) enddo enddo -end subroutine form_tau_nc +end subroutine diff --git a/src/CC/form_taus_nc.f90 b/src/CC/form_taus_nc.f90 index b834c9f..c49b2d5 100644 --- a/src/CC/form_taus_nc.f90 +++ b/src/CC/form_taus_nc.f90 @@ -31,4 +31,4 @@ subroutine form_taus_nc(nO,nV,t1,t2,taus) enddo enddo -end subroutine form_taus_nc +end subroutine diff --git a/src/CC/form_u.f90 b/src/CC/form_u.f90 index 6ae986c..ef612c2 100644 --- a/src/CC/form_u.f90 +++ b/src/CC/form_u.f90 @@ -68,4 +68,4 @@ subroutine form_u(nC,nO,nV,nR,OOOO,VVVV,OVOV,t2,u) enddo enddo -end subroutine form_u +end subroutine diff --git a/src/CC/form_ub.f90 b/src/CC/form_ub.f90 index abbb11d..723c864 100644 --- a/src/CC/form_ub.f90 +++ b/src/CC/form_ub.f90 @@ -45,4 +45,4 @@ subroutine form_ub(nC,nO,nV,nR,OOVV,t1,ub) end do end do -end subroutine form_ub +end subroutine diff --git a/src/CC/form_ubb.f90 b/src/CC/form_ubb.f90 index 252b5a6..836289a 100644 --- a/src/CC/form_ubb.f90 +++ b/src/CC/form_ubb.f90 @@ -64,4 +64,4 @@ subroutine form_ubb(nC,nO,nV,nR,VVVO,VOOO,t2,ubb) end do end do -end subroutine form_ubb +end subroutine diff --git a/src/CC/form_v.f90 b/src/CC/form_v.f90 index 38c839c..52a26b8 100644 --- a/src/CC/form_v.f90 +++ b/src/CC/form_v.f90 @@ -76,4 +76,4 @@ subroutine form_v(nC,nO,nV,nR,X1,X2,X3,X4,t2,v) enddo enddo -end subroutine form_v +end subroutine diff --git a/src/CC/lCCD.f90 b/src/CC/lCCD.f90 index 1b748c7..b7c77ae 100644 --- a/src/CC/lCCD.f90 +++ b/src/CC/lCCD.f90 @@ -215,4 +215,4 @@ subroutine lCCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF, write(*,*)'----------------------------------------------------' write(*,*) -end subroutine lCCD +end subroutine diff --git a/src/CC/pCCD.f90 b/src/CC/pCCD.f90 index f62f20a..203db1a 100644 --- a/src/CC/pCCD.f90 +++ b/src/CC/pCCD.f90 @@ -212,4 +212,4 @@ subroutine pCCD(maxSCF,thresh,max_diis,nBas,nC,nO,nV,nR,ERI,ENuc,ERHF,eHF) endif -end subroutine pCCD +end subroutine diff --git a/src/CC/rCCD.f90 b/src/CC/rCCD.f90 index 766c4bf..bba1607 100644 --- a/src/CC/rCCD.f90 +++ b/src/CC/rCCD.f90 @@ -223,4 +223,4 @@ subroutine rCCD(maxSCF,thresh,max_diis,nBasin,nCin,nOin,nVin,nRin,ERI,ENuc,ERHF, if(do_EE_EOM_CC_1h1p) call EE_EOM_CCD_1h1p(nC,nO,nV,nR,eO,eV,OOVV,OVVO,t) -end subroutine rCCD +end subroutine diff --git a/src/LR/print_unrestricted_transition_vectors.f90 b/src/LR/print_unrestricted_transition_vectors.f90 index a6e5d2d..653e14c 100644 --- a/src/LR/print_unrestricted_transition_vectors.f90 +++ b/src/LR/print_unrestricted_transition_vectors.f90 @@ -49,7 +49,7 @@ subroutine print_unrestricted_transition_vectors(ispin,nBas,nC,nO,nV,nR,nS,nSa,n ! Compute - call unrestricted_S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S,Omega,XpY,XmY,S2) + call S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S,Omega,XpY,XmY,S2) ! Print details about spin-conserved excitations @@ -167,4 +167,4 @@ subroutine print_unrestricted_transition_vectors(ispin,nBas,nC,nO,nV,nR,nS,nSa,n write(*,'(A30,F10.6)') 'Thomas-Reiche-Kuhn sum rule = ',sum(os(:)) write(*,*) -end subroutine print_unrestricted_transition_vectors +end subroutine diff --git a/src/LR/unrestricted_S2_expval.f90 b/src/LR/unrestricted_S2_expval.f90 deleted file mode 100644 index 3186615..0000000 --- a/src/LR/unrestricted_S2_expval.f90 +++ /dev/null @@ -1,180 +0,0 @@ -subroutine unrestricted_S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S,Omega,XpY,XmY,S2) - -! Compute for linear response excited states - - implicit none - include 'parameters.h' - -! Input variables - - - integer,intent(in) :: ispin - integer,intent(in) :: nBas - integer,intent(in) :: nC(nspin) - integer,intent(in) :: nO(nspin) - integer,intent(in) :: nV(nspin) - integer,intent(in) :: nR(nspin) - integer,intent(in) :: nS(nspin) - integer,intent(in) :: nSa - integer,intent(in) :: nSb - integer,intent(in) :: nSt - integer,intent(in) :: maxS - double precision,intent(in) :: c(nBas,nBas,nspin) - double precision,intent(in) :: S(nBas,nBas) - double precision,intent(in) :: Omega(nSt) - double precision,intent(in) :: XpY(nSt,nSt) - double precision,intent(in) :: XmY(nSt,nSt) - -! Local variables - - integer :: m - integer :: ia,i,a - double precision :: S2_exact - double precision :: S2_gs - double precision,allocatable :: Xa(:,:), Xb(:,:), Ya(:,:), Yb(:,:) - double precision,allocatable :: Xat(:,:),Xbt(:,:),Yat(:,:),Ybt(:,:) - double precision,allocatable :: OO(:,:), OV(:,:), VO(:,:), VV(:,:) - double precision,allocatable :: OOt(:,:),OVt(:,:),VOt(:,:),VVt(:,:) - double precision,external :: trace_matrix - -! Output variables - - double precision,intent(out) :: S2(maxS) - -! Memory allocation - - allocate(OO(nO(1)-nC(1),nO(2)-nC(2)), OV(nO(1)-nC(1),nV(2)-nR(2)), VO(nV(1)-nR(1),nO(2)-nC(2)), VV(nV(1)-nR(1),nV(2)-nR(2)), & - OOt(nO(2)-nC(2),nO(1)-nC(1)),OVt(nV(2)-nR(2),nO(1)-nC(1)),VOt(nO(2)-nC(2),nV(1)-nR(1)),VVt(nV(2)-nR(2),nV(1)-nR(1))) - -! Overlap matrix between spin-up and spin-down orbitals - - OO(:,:) = matmul(transpose(c(:,nC(1)+1:nO(1) ,1)),matmul(S,c(:,nC(2)+1:nO(2) ,2))) - OV(:,:) = matmul(transpose(c(:,nC(1)+1:nO(1) ,1)),matmul(S,c(:,nO(2)+1:nBas-nR(2),2))) - VO(:,:) = matmul(transpose(c(:,nO(1)+1:nBas-nR(1),1)),matmul(S,c(:,nC(2)+1:nO(2) ,2))) - VV(:,:) = matmul(transpose(c(:,nO(1)+1:nBas-nR(1),1)),matmul(S,c(:,nO(2)+1:nBas-nR(2),2))) - - OOt(:,:) = transpose(OO(:,:)) - OVt(:,:) = transpose(OV(:,:)) - VOt(:,:) = transpose(VO(:,:)) - VVt(:,:) = transpose(VV(:,:)) - -!-------------------------! -! for ground state ! -!-------------------------! - - S2_exact = dble(nO(1) - nO(2))/2d0*(dble(nO(1) - nO(2))/2d0 + 1d0) - S2_gs = S2_exact + dble(nO(2)) - sum(OO(:,:)**2) - -!------------------------------------------! -! for spin-conserved-excited states ! -!------------------------------------------! - - if(ispin == 1) then - - allocate(Xa(nO(1)-nC(1),nV(1)-nR(1)), Ya(nO(1)-nC(1),nV(1)-nR(1)), Xb(nO(2)-nC(2),nV(2)-nR(2)), Yb(nO(2)-nC(2),nV(2)-nR(2)), & - Xat(nV(1)-nR(1),nO(1)-nC(1)),Yat(nV(1)-nR(1),nO(1)-nC(1)),Xbt(nV(2)-nR(2),nO(2)-nC(2)),Ybt(nV(2)-nR(2),nO(2)-nC(2))) - - do m=1,maxS - - ia = 0 - do i=nC(1)+1,nO(1) - do a=1,nV(1)-nR(1) - ia = ia + 1 - Xa(i,a) = 0.5d0*(XpY(m,ia) + XmY(m,ia)) - Ya(i,a) = 0.5d0*(XpY(m,ia) - XmY(m,ia)) - end do - end do - - ia = 0 - do i=nC(2)+1,nO(2) - do a=1,nV(2)-nR(2) - ia = ia + 1 - Xb(i,a) = 0.5d0*(XpY(m,nSa+ia) + XmY(m,nSa+ia)) - Yb(i,a) = 0.5d0*(XpY(m,nSa+ia) - XmY(m,nSa+ia)) - end do - end do - - Xat(:,:) = transpose(Xa(:,:)) - Xbt(:,:) = transpose(Xb(:,:)) - Yat(:,:) = transpose(Ya(:,:)) - Ybt(:,:) = transpose(Yb(:,:)) - - S2(m) = S2_gs & - + trace_matrix(nV(1),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) & - + trace_matrix(nV(2),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) & - - trace_matrix(nO(1),matmul(Xa,matmul(VO,matmul(VOt,Xat)))) & - - trace_matrix(nO(2),matmul(Xb,matmul(OVt,matmul(OV,Xbt)))) & - - 2d0*trace_matrix(nO(1),matmul(OO,matmul(Xb,matmul(VVt,Xat)))) & - - - 2d0*trace_matrix(nV(2),matmul(OVt,matmul(Xa,matmul(VO,Yb)))) & - - 2d0*trace_matrix(nV(1),matmul(VO,matmul(Xb,matmul(OVt,Ya)))) & - - - trace_matrix(nV(1),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) & - - trace_matrix(nV(2),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) & - + trace_matrix(nO(1),matmul(Ya,matmul(VO,matmul(VOt,Yat)))) & - + trace_matrix(nO(2),matmul(Yb,matmul(OVt,matmul(OV,Ybt)))) & - + 2d0*trace_matrix(nO(1),matmul(Ya,matmul(VV,matmul(Ybt,OOt)))) - - end do - - end if - -!------------------------------------------! -! for spin-conserved-excited states ! -!------------------------------------------! - - if(ispin == 2) then - - allocate(Xa(nO(1)-nC(1),nV(2)-nR(2)), Ya(nO(1)-nC(1),nV(2)-nR(2)), Xb(nO(2)-nC(2),nV(1)-nR(1)), Yb(nO(2)-nC(2),nV(1)-nR(1)), & - Xat(nV(2)-nR(2),nO(1)-nC(1)),Yat(nV(2)-nR(2),nO(1)-nC(1)),Xbt(nV(1)-nR(1),nO(2)-nC(2)),Ybt(nV(1)-nR(1),nO(2)-nC(2))) - - do m=1,maxS - - ia = 0 - do i=nC(1)+1,nO(1) - do a=1,nV(2)-nR(2) - ia = ia + 1 - Xa(i,a) = 0.5d0*(XpY(m,ia) + XmY(m,ia)) - Ya(i,a) = 0.5d0*(XpY(m,ia) - XmY(m,ia)) - end do - end do - - ia = 0 - do i=nC(2)+1,nO(2) - do a=1,nV(1)-nR(1) - ia = ia + 1 - Xb(i,a) = 0.5d0*(XpY(m,nSa+ia) + XmY(m,nSa+ia)) - Yb(i,a) = 0.5d0*(XpY(m,nSa+ia) - XmY(m,nSa+ia)) - end do - end do - - Xat(:,:) = transpose(Xa(:,:)) - Xbt(:,:) = transpose(Xb(:,:)) - Yat(:,:) = transpose(Ya(:,:)) - Ybt(:,:) = transpose(Yb(:,:)) - - S2(m) = S2_gs + dble(nO(2) - nO(1)) + 1d0 - - S2(m) = S2(m) & - - + trace_matrix(nV(1),matmul(Xbt,matmul(OOt,matmul(OO,Xb)))) & - - trace_matrix(nO(2),matmul(Xb,matmul(VO,matmul(VOt,Xbt)))) & - + trace_matrix(nO(2),matmul(Xb,VO))**2 & - + trace_matrix(nV(2),matmul(Yat,matmul(OO,matmul(OOt,Ya)))) & - + trace_matrix(nO(1),matmul(Ya,matmul(OVt,matmul(OV,Yat)))) & - + trace_matrix(nO(1),matmul(Ya,OVt))**2 & - - 2d0*trace_matrix(nO(2),matmul(Xb,VO))*trace_matrix(nO(1),matmul(Ya,OVt)) & - - + trace_matrix(nV(2),matmul(Xat,matmul(OO,matmul(OOt,Xa)))) & - - trace_matrix(nO(1),matmul(Xa,matmul(OVt,matmul(OV,Xat)))) & - + trace_matrix(nO(1),matmul(Xa,OVt))**2 & - + trace_matrix(nV(1),matmul(Ybt,matmul(OOt,matmul(OO,Yb)))) & - - trace_matrix(nO(2),matmul(Yb,matmul(VO,matmul(VOt,Ybt)))) & - + trace_matrix(nV(1),matmul(Ybt,VOt))**2 & - - 2d0*trace_matrix(nO(1),matmul(Xa,OVt))*trace_matrix(nO(2),matmul(Yb,VO)) - - end do - - end if - -end subroutine unrestricted_S2_expval diff --git a/src/LR/unrestricted_oscillator_strength.f90 b/src/LR/unrestricted_oscillator_strength.f90 index 50d18c1..27a0eab 100644 --- a/src/LR/unrestricted_oscillator_strength.f90 +++ b/src/LR/unrestricted_oscillator_strength.f90 @@ -82,4 +82,4 @@ subroutine unrestricted_oscillator_strength(nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS write(*,*) '---------------------------------------------------------------' write(*,*) -end subroutine unrestricted_oscillator_strength +end subroutine