11subroutine CVS_phULR_transition_vectors (ispin ,nBas ,nC ,nO ,nV ,nR ,nS ,nSa ,nSb ,nSt ,&
2- nCVS ,occupations ,virtuals ,dipole_int_aa ,dipole_int_bb ,c ,S ,Om ,XpY ,XmY )
2+ nCVS ,nFC , occupations ,virtuals ,dipole_int_aa ,dipole_int_bb ,c ,S ,Om ,XpY ,XmY )
33
44! Print transition vectors for linear response calculation
55
@@ -19,6 +19,7 @@ subroutine CVS_phULR_transition_vectors(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,&
1919 integer ,intent (in ) :: nSb
2020 integer ,intent (in ) :: nSt
2121 integer ,intent (in ) :: nCVS(nspin)
22+ integer ,intent (in ) :: nFC(nspin)
2223 integer ,intent (in ) :: occupations(maxval (nO),nspin)
2324 integer ,intent (in ) :: virtuals(nBas - minval (nO),nspin)
2425 double precision :: dipole_int_aa(nBas,nBas,ncart)
@@ -32,142 +33,141 @@ subroutine CVS_phULR_transition_vectors(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,&
3233! Local variables
3334
3435 integer :: ia,jb,j,b
35- integer :: maxS = 30
36+ integer :: maxS = 10
3637 double precision ,parameter :: thres_vec = 0.1d0
3738 double precision ,allocatable :: X(:)
3839 double precision ,allocatable :: Y(:)
3940 double precision ,allocatable :: os(:)
4041 double precision ,allocatable :: S2(:)
4142
4243! Memory allocation
43- print * , " Transistion vectors not yet implemented for CVS !"
44- ! maxS = min(nSt,maxS)
45- ! allocate(X(nSt),Y(nSt),os(maxS),S2(maxS))
46- !
47- ! ! Compute oscillator strengths
48- !
49- ! os(:) = 0d0
50- ! if(ispin == 1) call phULR_oscillator_strength(nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS, &
51- ! dipole_int_aa,dipole_int_bb,Om,XpY,XmY,os)
52- !
44+ maxS = min (nSt,maxS)
45+ allocate (X(nSt),Y(nSt),os(maxS),S2(maxS))
46+
47+ ! Compute oscillator strengths
48+
49+ os(:) = 0d0
50+ if (ispin == 1 ) call CVS_phULR_oscillator_strength(nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,nCVS,nFC,maxS, &
51+ occupations,virtuals,dipole_int_aa,dipole_int_bb,Om,XpY,XmY,os)
52+
5353! ! Compute <S**2>
5454!
5555! call S2_expval(ispin,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,maxS,c,S,Om,XpY,XmY,S2)
56- !
57- ! ! Print details about spin-conserved excitations
58- !
59- ! if(ispin == 1) then
60- !
61- ! do ia=1,maxS
62- !
63- ! X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
64- ! Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
65- !
66- ! print*,'-------------------------------------------------------------'
67- ! write(*,'(A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
68- ! ' Excitation n. ',ia,': ',Om(ia)*HaToeV,' eV',' f = ',os(ia),' <S**2> = ',S2(ia)
69- ! print*,'-------------------------------------------------------------'
70- !
71- ! ! Spin-up transitions
72- !
73- ! jb = 0
74- ! do j=nC(1)+1 ,nO(1)
75- ! do b=nO (1)+1,nBas-nR (1)
76- ! jb = jb + 1
77- ! if(abs(X(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A -> ',b ,'A = ',X(jb)
78- ! end do
79- ! end do
80- !
81- ! jb = 0
82- ! do j=nC(1)+1 ,nO(1)
83- ! do b=nO (1)+1,nBas-nR (1)
84- ! jb = jb + 1
85- ! if(abs(Y(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A <- ',b ,'A = ',Y(jb)
86- ! end do
87- ! end do
88- !
89- ! ! Spin-down transitions
90- !
91- ! jb = 0
92- ! do j=nC(2)+ 1,nO(2)
93- ! do b=nO (2)+1,nBas-nR (2)
94- ! jb = jb + 1
95- ! if(abs(X(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'B -> ',b ,'B = ',X(nSa+jb)
96- ! end do
97- ! end do
98- !
99- ! jb = 0
100- ! do j=nC(2)+ 1,nO(2)
101- ! do b=nO (2)+1,nBas-nR (2)
102- ! jb = jb + 1
103- ! if(abs(Y(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'B <- ',b ,'B = ',Y(nSa+jb)
104- ! end do
105- ! end do
106- ! write(*,*)
107- !
108- ! end do
109- !
110- ! end if
111- !
112- ! ! Print details about spin-flip excitations
113- !
114- ! if(ispin == 2) then
115- !
116- ! do ia=1,maxS
117- !
118- ! X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
119- ! Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
120- !
121- !
122- ! print*,'-------------------------------------------------------------'
123- ! write(*,'(A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
124- ! ' Excitation n. ',ia,': ',Om(ia)*HaToeV,' eV',' f = ',os(ia),' <S**2> = ',S2(ia)
125- ! print*,'-------------------------------------------------------------'
126- !
127- ! ! Spin-up transitions
128- !
129- ! jb = 0
130- ! do j=nC(1)+1 ,nO(1)
131- ! do b=nO (2)+1,nBas-nR (2)
132- ! jb = jb + 1
133- ! if(abs(X(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A -> ',b ,'B = ',X(jb)
134- ! end do
135- ! end do
136- !
137- ! jb = 0
138- ! do j=nC(1)+1 ,nO(1)
139- ! do b=nO (2)+1,nBas-nR (2)
140- ! jb = jb + 1
141- ! if(abs(Y(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A <- ',b ,'B = ',Y(jb)
142- ! end do
143- ! end do
144- !
145- ! ! Spin-down transitions
146- !
147- ! jb = 0
148- ! do j=nC(2)+ 1,nO(2)
149- ! do b=nO (1)+1,nBas-nR (1)
150- ! jb = jb + 1
151- ! if(abs(X(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A -> ',b ,'B = ',X(nSa+jb)
152- ! end do
153- ! end do
154- !
155- ! jb = 0
156- ! do j=nC(2)+ 1,nO(2)
157- ! do b=nO (1)+1,nBas-nR (1)
158- ! jb = jb + 1
159- ! if(abs(Y(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j, 'A <- ',b ,'B = ',Y(nSa+jb)
160- ! end do
161- ! end do
162- ! write(*,*)
163- !
164- ! end do
165- !
166- ! end if
167- !
168- ! ! Thomas-Reiche-Kuhn sum rule
169- !
170- ! write(*,'(A30,F10.6)') 'Thomas-Reiche-Kuhn sum rule = ',sum(os(:))
171- ! write(*,*)
172- !
56+
57+ ! Print details about spin-conserved excitations
58+
59+ if (ispin == 1 ) then
60+
61+ do ia= 1 ,maxS
62+
63+ X(:) = 0.5d0 * (XpY(ia,:) + XmY(ia,:))
64+ Y(:) = 0.5d0 * (XpY(ia,:) - XmY(ia,:))
65+
66+ print * ,' -------------------------------------------------------------'
67+ write (* ,' (A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)' ) &
68+ ' Excitation n. ' ,ia,' : ' ,Om(ia)* HaToeV,' eV' ,' f = ' ,os(ia)! ,' <S**2> = ',S2(ia)
69+ print * ,' -------------------------------------------------------------'
70+
71+ ! Spin-up transitions
72+
73+ jb = 0
74+ do j= 1 ,nO ( 1 ) - nFC (1 )
75+ do b= nCVS (1 )+ 1 ,nBas- nO (1 )
76+ jb = jb + 1
77+ if (abs (X(jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 1 ), ' A -> ' ,virtuals(b, 1 ) ,' A = ' ,X(jb)
78+ end do
79+ end do
80+
81+ jb = 0
82+ do j= 1 ,nO ( 1 ) - nFC (1 )
83+ do b= nCVS (1 )+ 1 ,nBas- nO (1 )
84+ jb = jb + 1
85+ if (abs (Y(jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 1 ), ' A <- ' ,virtuals(b, 1 ) ,' A = ' ,Y(jb)
86+ end do
87+ end do
88+
89+ ! Spin-down transitions
90+
91+ jb = 0
92+ do j= 1 ,nO ( 2 ) - nFC (2 )
93+ do b= nCVS (2 )+ 1 ,nBas- nO (2 )
94+ jb = jb + 1
95+ if (abs (X(nSa+ jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 2 ), ' B -> ' ,virtuals(b, 2 ) ,' B = ' ,X(nSa+ jb)
96+ end do
97+ end do
98+
99+ jb = 0
100+ do j= 1 ,nO ( 2 ) - nFC (2 )
101+ do b= nCVS (2 )+ 1 ,nBas- nO (2 )
102+ jb = jb + 1
103+ if (abs (Y(nSa+ jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 2 ), ' B <- ' ,virtuals(b, 2 ) ,' B = ' ,Y(nSa+ jb)
104+ end do
105+ end do
106+ write (* ,* )
107+
108+ end do
109+
110+ end if
111+
112+ ! Print details about spin-flip excitations
113+
114+ if (ispin == 2 ) then
115+
116+ do ia= 1 ,maxS
117+
118+ X(:) = 0.5d0 * (XpY(ia,:) + XmY(ia,:))
119+ Y(:) = 0.5d0 * (XpY(ia,:) - XmY(ia,:))
120+
121+
122+ print * ,' -------------------------------------------------------------'
123+ write (* ,' (A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)' ) &
124+ ' Excitation n. ' ,ia,' : ' ,Om(ia)* HaToeV,' eV' ,' f = ' ,os(ia)! ,' <S**2> = ',S2(ia)
125+ print * ,' -------------------------------------------------------------'
126+
127+ ! Spin-up transitions
128+
129+ jb = 0
130+ do j= 1 ,nO ( 1 ) - nFC (1 )
131+ do b= nCVS (2 )+ 1 ,nBas- nO (2 )
132+ jb = jb + 1
133+ if (abs (X(jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 1 ), ' A -> ' ,virtuals(b, 2 ) ,' B = ' ,X(jb)
134+ end do
135+ end do
136+
137+ jb = 0
138+ do j= 1 ,nO ( 1 ) - nFC (1 )
139+ do b= nCVS (2 )+ 1 ,nBas- nO (2 )
140+ jb = jb + 1
141+ if (abs (Y(jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 1 ), ' A <- ' ,virtuals(b, 2 ) ,' B = ' ,Y(jb)
142+ end do
143+ end do
144+
145+ ! Spin-down transitions
146+
147+ jb = 0
148+ do j= 1 ,nO ( 2 ) - nFC (2 )
149+ do b= nCVS (1 )+ 1 ,nBas- nO (1 )
150+ jb = jb + 1
151+ if (abs (X(nSa+ jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 2 ), ' A -> ' ,virtuals(b, 1 ) ,' B = ' ,X(nSa+ jb)
152+ end do
153+ end do
154+
155+ jb = 0
156+ do j= 1 ,nO ( 2 ) - nFC (2 )
157+ do b= nCVS (1 )+ 1 ,nBas- nO (1 )
158+ jb = jb + 1
159+ if (abs (Y(nSa+ jb)) > thres_vec) write (* ,' (I3,A5,I3,A4,F10.6)' ) occupations(j, 2 ), ' A <- ' ,virtuals(b, 1 ) ,' B = ' ,Y(nSa+ jb)
160+ end do
161+ end do
162+ write (* ,* )
163+
164+ end do
165+
166+ end if
167+
168+ ! Thomas-Reiche-Kuhn sum rule
169+
170+ write (* ,' (A30,F10.6)' ) ' Thomas-Reiche-Kuhn sum rule = ' ,sum (os(:))
171+ write (* ,* )
172+
173173end subroutine
0 commit comments