2020-09-28 22:58:58 +02:00
|
|
|
subroutine print_unrestricted_transition_vectors(spin_allowed,nBas,nC,nO,nV,nR,nS,nSa,nSb,nSt,dipole_int_aa,dipole_int_bb, &
|
|
|
|
Omega,XpY,XmY)
|
2020-09-28 22:24:02 +02:00
|
|
|
|
|
|
|
! Print transition vectors for linear response calculation
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
logical,intent(in) :: spin_allowed
|
|
|
|
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)
|
2020-09-28 22:58:58 +02:00
|
|
|
integer,intent(in) :: nSa
|
|
|
|
integer,intent(in) :: nSb
|
2020-09-28 22:24:02 +02:00
|
|
|
integer,intent(in) :: nSt
|
2020-09-28 22:58:58 +02:00
|
|
|
double precision :: dipole_int_aa(nBas,nBas,ncart)
|
|
|
|
double precision :: dipole_int_bb(nBas,nBas,ncart)
|
2020-09-28 22:24:02 +02:00
|
|
|
double precision,intent(in) :: Omega(nSt)
|
|
|
|
double precision,intent(in) :: XpY(nSt,nSt)
|
|
|
|
double precision,intent(in) :: XmY(nSt,nSt)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
logical :: debug = .false.
|
2020-09-28 22:24:02 +02:00
|
|
|
integer :: ia,jb,i,j,a,b
|
|
|
|
integer :: ixyz
|
|
|
|
integer :: ispin
|
|
|
|
integer,parameter :: maxS = 10
|
2020-10-03 22:16:38 +02:00
|
|
|
double precision :: S2
|
2020-09-28 22:24:02 +02:00
|
|
|
double precision,parameter :: thres_vec = 0.1d0
|
|
|
|
double precision,allocatable :: X(:)
|
|
|
|
double precision,allocatable :: Y(:)
|
|
|
|
double precision,allocatable :: f(:,:)
|
|
|
|
double precision,allocatable :: os(:)
|
|
|
|
|
|
|
|
! Memory allocation
|
|
|
|
|
|
|
|
allocate(X(nSt),Y(nSt),f(nSt,ncart),os(nSt))
|
|
|
|
|
2020-09-30 09:59:18 +02:00
|
|
|
! Initialization
|
2020-09-28 22:24:02 +02:00
|
|
|
|
|
|
|
f(:,:) = 0d0
|
2020-09-30 09:59:18 +02:00
|
|
|
os(:) = 0d0
|
|
|
|
|
|
|
|
! Compute dipole moments and oscillator strengths
|
|
|
|
|
|
|
|
|
2020-09-28 22:24:02 +02:00
|
|
|
if(spin_allowed) then
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
do ia=1,nSt
|
|
|
|
do ixyz=1,ncart
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(1)+1,nO(1)
|
|
|
|
do b=nO(1)+1,nBas-nR(1)
|
|
|
|
jb = jb + 1
|
|
|
|
f(ia,ixyz) = f(ia,ixyz) + dipole_int_aa(j,b,ixyz)*XpY(ia,jb)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(2)+1,nO(2)
|
|
|
|
do b=nO(2)+1,nBas-nR(2)
|
|
|
|
jb = jb + 1
|
|
|
|
f(ia,ixyz) = f(ia,ixyz) + dipole_int_bb(j,b,ixyz)*XpY(ia,nSa+jb)
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
2020-09-28 22:58:58 +02:00
|
|
|
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
2020-09-28 23:19:26 +02:00
|
|
|
do ia=1,nSt
|
|
|
|
os(ia) = 2d0/3d0*Omega(ia)*sum(f(ia,:)**2)
|
|
|
|
end do
|
|
|
|
|
2020-09-28 22:58:58 +02:00
|
|
|
if(debug) then
|
|
|
|
|
|
|
|
write(*,*) '----------------'
|
|
|
|
write(*,*) ' Dipole moments '
|
|
|
|
write(*,*) '----------------'
|
|
|
|
call matout(nSt,ncart,f(:,:))
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
write(*,*) '----------------------'
|
|
|
|
write(*,*) ' Oscillator strengths '
|
|
|
|
write(*,*) '----------------------'
|
|
|
|
call matout(nSt,1,os(:))
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end if
|
2020-09-28 22:24:02 +02:00
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
! Print details about excitations
|
|
|
|
|
|
|
|
do ia=1,min(nSt,maxS)
|
|
|
|
|
|
|
|
X(:) = 0.5d0*(XpY(ia,:) + XmY(ia,:))
|
|
|
|
Y(:) = 0.5d0*(XpY(ia,:) - XmY(ia,:))
|
|
|
|
|
2020-10-03 22:16:38 +02:00
|
|
|
S2 = (nO(1) - nO(2))/2d0
|
|
|
|
S2 = 2d0*S2+1d0
|
|
|
|
S2 = 0.0d0
|
|
|
|
do jb=1,nSa
|
|
|
|
S2 = S2 + 4d0*(X(jb)**2 + Y(jb)**2)
|
|
|
|
end do
|
|
|
|
do jb=1,nSb
|
|
|
|
S2 = S2 - 4d0*(X(nSa+jb)**2 + Y(nSa+jb)**2)
|
|
|
|
end do
|
|
|
|
|
|
|
|
print*,'-------------------------------------------------------------'
|
|
|
|
write(*,'(A15,I3,A2,F10.6,A3,A6,F6.4,A11,F6.4)') &
|
|
|
|
' Excitation n. ',ia,': ',Omega(ia)*HaToeV,' eV',' f = ',os(ia),' <S**2> = ',S2
|
|
|
|
print*,'-------------------------------------------------------------'
|
2020-09-28 22:24:02 +02:00
|
|
|
|
|
|
|
! Spin-up transitions
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(1)+1,nO(1)
|
|
|
|
do b=nO(1)+1,nBas-nR(1)
|
|
|
|
jb = jb + 1
|
2020-10-03 22:16:38 +02:00
|
|
|
if(abs(X(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j,'A -> ',b,'A = ',X(jb)
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(1)+1,nO(1)
|
|
|
|
do b=nO(1)+1,nBas-nR(1)
|
|
|
|
jb = jb + 1
|
2020-10-03 22:16:38 +02:00
|
|
|
if(abs(Y(jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j,'A <- ',b,'A = ',Y(jb)
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
! Spin-down transitions
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(2)+1,nO(2)
|
|
|
|
do b=nO(2)+1,nBas-nR(2)
|
|
|
|
jb = jb + 1
|
2020-10-03 22:16:38 +02:00
|
|
|
if(abs(X(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j,'B -> ',b,'B = ',X(nSa+jb)
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
jb = 0
|
|
|
|
do j=nC(2)+1,nO(2)
|
|
|
|
do b=nO(2)+1,nBas-nR(2)
|
|
|
|
jb = jb + 1
|
2020-10-03 22:16:38 +02:00
|
|
|
if(abs(Y(nSa+jb)) > thres_vec) write(*,'(I3,A5,I3,A4,F10.6)') j,'B <- ',b,'B = ',Y(nSa+jb)
|
2020-09-28 22:24:02 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end do
|
|
|
|
|
2020-10-03 22:16:38 +02:00
|
|
|
! Thomas-Reiche-Kuhn sum rule
|
|
|
|
|
2020-09-28 22:24:02 +02:00
|
|
|
write(*,'(A30,F10.6)') 'Thomas-Reiche-Kuhn sum rule = ',sum(os(:))
|
|
|
|
write(*,*)
|
|
|
|
|
|
|
|
end subroutine print_unrestricted_transition_vectors
|