1- subroutine CVS_phLR_transition_vectors (spin_allowed ,nOrb ,nC ,nO ,nV ,nR ,nS ,dipole_int ,Om ,XpY ,XmY )
1+ subroutine CVS_phLR_transition_vectors (spin_allowed ,nOrb ,nC ,nO ,nV ,nR ,nS ,nCVS , nFC , occupations , virtuals , dipole_int ,Om ,XpY ,XmY )
22
33! Print transition vectors for linear response calculation
44
@@ -14,6 +14,8 @@ subroutine CVS_phLR_transition_vectors(spin_allowed,nOrb,nC,nO,nV,nR,nS,dipole_i
1414 integer ,intent (in ) :: nV
1515 integer ,intent (in ) :: nR
1616 integer ,intent (in ) :: nS
17+ integer ,intent (in ) :: nCVS,nFC
18+ integer ,intent (in ) :: occupations(nO- nFC),virtuals(nOrb- nO)
1719 double precision :: dipole_int(nOrb,nOrb,ncart)
1820 double precision ,intent (in ) :: Om(nS)
1921 double precision ,intent (in ) :: XpY(nS,nS)
@@ -22,66 +24,65 @@ subroutine CVS_phLR_transition_vectors(spin_allowed,nOrb,nC,nO,nV,nR,nS,dipole_i
2224! Local variables
2325
2426 integer :: ia,jb,j,b
25- integer :: maxS = 30
27+ integer :: maxS = 10
2628 double precision :: S2
2729 double precision ,parameter :: thres_vec = 0.1d0
2830 double precision ,allocatable :: X(:)
2931 double precision ,allocatable :: Y(:)
3032 double precision ,allocatable :: os(:)
3133
32- print * , " Transistion vectors for this method not implemented yet, sry..."
33- ! ! Memory allocation
34- !
35- ! maxS = min(nS,maxS)
36- ! allocate(X(nS),Y(nS),os(maxS))
37- !
38- ! ! Compute oscillator strengths
39- !
40- ! os(:) = 0d0
41- ! if(spin_allowed) call phLR_oscillator_strength(nOrb,nC,nO,nV,nR,nS,maxS,dipole_int,Om,XpY,XmY,os)
42- !
43- ! ! Print details about excitations
44- !
45- ! do ia=1,maxS
46- !
47- ! X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
48- ! Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
49- !
50- ! ! <S**2> values
51- !
52- ! if(spin_allowed) then
53- ! S2 = 0d0
54- ! else
55- ! S2 = 2d0
56- ! end if
57- !
58- ! print*,'-------------------------------------------------------------'
59- ! write(*,'(A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
60- ! ' Excitation n. ',ia,': ',Om(ia)*HaToeV,' eV',' f = ',os(ia),' <S**2> = ',S2
61- ! print*,'-------------------------------------------------------------'
62- !
63- ! jb = 0
64- ! do j=nC+1,nO
65- ! do b=nO+1,nOrb-nR
66- ! jb = jb + 1
67- ! if(abs(X(jb)) > thres_vec) write(*,'(I3,A4,I3,A3,F10.6)') j,' -> ',b,' = ',X(jb)/sqrt(2d0)
68- ! end do
69- ! end do
70- !
71- ! jb = 0
72- ! do j=nC+1,nO
73- ! do b=nO+1,nOrb-nR
74- ! jb = jb + 1
75- ! if(abs(Y(jb)) > thres_vec) write(*,'(I3,A4,I3,A3,F10.6)') j,' <- ',b,' = ',Y(jb)/sqrt(2d0)
76- ! end do
77- ! end do
78- ! write(*,*)
79- !
80- ! end do
81- !
82- ! ! Thomas-Reiche-Kuhn sum rule
83- !
84- ! write(*,'(A30,F10.6)') 'Thomas-Reiche-Kuhn sum rule = ',sum(os(:))
85- ! write(*,*)
34+ ! Memory allocation
35+
36+ maxS = min (nS,maxS)
37+ allocate (X(nS),Y(nS),os(maxS))
38+
39+ ! Compute oscillator strengths
40+
41+ os(:) = 0d0
42+ if (spin_allowed) call CVS_phLR_oscillator_strength(nOrb,nC,nO,nV,nR,nS,nCVS,nFC,maxS,occupations,virtuals,dipole_int,Om,XpY,XmY,os)
43+
44+ ! Print details about excitations
45+
46+ do ia= 1 ,maxS
47+
48+ X(:) = 0.5d0 * (XpY(ia,:) + XmY(ia,:))
49+ Y(:) = 0.5d0 * (XpY(ia,:) - XmY(ia,:))
50+
51+ ! <S**2> values
52+
53+ if (spin_allowed) then
54+ S2 = 0d0
55+ else
56+ S2 = 2d0
57+ end if
58+
59+ print * ,' -------------------------------------------------------------'
60+ write (* ,' (A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)' ) &
61+ ' Excitation n. ' ,ia,' : ' ,Om(ia)* HaToeV,' eV' ,' f = ' ,os(ia),' <S**2> = ' ,S2
62+ print * ,' -------------------------------------------------------------'
63+
64+ jb = 0
65+ do j= 1 ,nO- nFC
66+ do b= nCVS+1 ,nOrb- nO
67+ jb = jb + 1
68+ if (abs (X(jb)) > thres_vec) write (* ,' (I3,A4,I3,A3,F10.6)' ) occupations(j),' -> ' ,virtuals(b),' = ' ,X(jb)/ sqrt (2d0 )
69+ end do
70+ end do
71+
72+ jb = 0
73+ do j= 1 ,nO- nFC
74+ do b= nCVS+1 ,nOrb- nO
75+ jb = jb + 1
76+ if (abs (Y(jb)) > thres_vec) write (* ,' (I3,A4,I3,A3,F10.6)' ) occupations(j),' <- ' ,virtuals(b),' = ' ,Y(jb)/ sqrt (2d0 )
77+ end do
78+ end do
79+ write (* ,* )
80+
81+ end do
82+
83+ ! Thomas-Reiche-Kuhn sum rule
84+
85+ write (* ,' (A30,F10.6)' ) ' Thomas-Reiche-Kuhn sum rule = ' ,sum (os(:))
86+ write (* ,* )
8687
8788end subroutine
0 commit comments