4
1
mirror of https://github.com/pfloos/quack synced 2024-10-19 06:21:49 +02:00
quack/src/LR/phLR_oscillator_strength.f90

76 lines
1.9 KiB
Fortran
Raw Normal View History

2023-07-28 14:14:35 +02:00
subroutine phLR_oscillator_strength(nBas,nC,nO,nV,nR,nS,maxS,dipole_int,Om,XpY,XmY,os)
2020-10-04 14:22:38 +02:00
! Compute linear response
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nBas
integer,intent(in) :: nC
integer,intent(in) :: nO
integer,intent(in) :: nV
integer,intent(in) :: nR
integer,intent(in) :: nS
2020-10-05 16:58:19 +02:00
integer,intent(in) :: maxS
2020-10-04 14:22:38 +02:00
double precision :: dipole_int(nBas,nBas,ncart)
2023-07-20 22:01:11 +02:00
double precision,intent(in) :: Om(nS)
2020-10-04 14:22:38 +02:00
double precision,intent(in) :: XpY(nS,nS)
double precision,intent(in) :: XmY(nS,nS)
! Local variables
2023-10-23 21:36:07 +02:00
integer :: m,jb,i,j,a,b
2020-10-04 14:22:38 +02:00
integer :: ixyz
double precision,allocatable :: f(:,:)
! Output variables
2022-09-09 21:48:50 +02:00
double precision,intent(out) :: os(nS)
2020-10-04 14:22:38 +02:00
! Memory allocation
2020-10-05 16:58:19 +02:00
allocate(f(maxS,ncart))
2020-10-04 14:22:38 +02:00
! Initialization
f(:,:) = 0d0
! Compute dipole moments and oscillator strengths
2023-10-23 21:36:07 +02:00
do m=1,maxS
2020-10-04 14:22:38 +02:00
do ixyz=1,ncart
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
2023-10-23 21:36:07 +02:00
f(m,ixyz) = f(m,ixyz) + dipole_int(j,b,ixyz)*XpY(m,jb)
2020-10-04 14:22:38 +02:00
end do
end do
end do
end do
f(:,:) = sqrt(2d0)*f(:,:)
2023-10-23 21:36:07 +02:00
do m=1,maxS
os(m) = 2d0/3d0*Om(m)*sum(f(m,:)**2)
2020-10-04 14:22:38 +02:00
end do
2020-10-05 16:58:19 +02:00
write(*,*) '---------------------------------------------------------------'
write(*,*) ' Transition dipole moment (au) '
write(*,*) '---------------------------------------------------------------'
write(*,'(A3,5A12)') '#','X','Y','Z','dip. str.','osc. str.'
write(*,*) '---------------------------------------------------------------'
2023-10-23 21:36:07 +02:00
do m=1,maxS
write(*,'(I3,5F12.6)') m,(f(m,ixyz),ixyz=1,ncart),sum(f(m,:)**2),os(m)
2020-10-05 16:58:19 +02:00
end do
write(*,*) '---------------------------------------------------------------'
write(*,*)
2020-10-04 14:22:38 +02:00
2023-10-23 21:36:07 +02:00
! do m=1,maxS
! write(*,'(I3,3F12.6)') m,Om(m),os(m)
! end do
2023-07-12 22:56:20 +02:00
end subroutine