SUBROUTINE translational( k_out, wfdim, wftemp, ijrot, ivib) USE Numeric_Kinds_Module USE CommonInfo_Module USE PiFactrs_Module USE Jacobi_Module USE Gaussian_Module USE APH_Module USE Masses_Module USE Complex_Module IMPLICIT NONE SAVE !========================================================================================= ! I N P U T INTEGER,INTENT(IN) :: wfdim, ijrot, ivib REAL(dp),INTENT(IN) :: k_out !========================================================================================= ! O U T P U T COMPLEX(dp) :: wftemp(wfdim) !========================================================================================= ! I N T E R N A L S INTEGER :: irho, itheta, ichi, ispt, itc REAL(KIND=dp) :: arg, gcoord, fac, cgcoeff COMPLEX(dp) :: hnkl,dhnkl !COMPLEX(dp) :: imag !========================================================================================= ! F U N C T I O N S INTEGER :: aphindex, aphindex_tc REAL(dp) :: cleb !=============================================================================== ! Calculate the translation eigenfunction !imag=Cmplx(0.d0,1.d0,dp) wftemp=0.d0 fac=SQRT(usys/(2.d0*pi*k_out)) irho=ind_rho_infty DO itheta=1,ntheta DO ichi=1,nchi ispt=aphindex(ntheta,nchi,irho,itheta,ichi,.false.) itc=aphindex_tc(nchi,itheta,ichi) gcoord=larges(ispt) arg=gcoord*k_out !realpart=fac*Cos((k_out*gcoord)-(ijrot*pi/2.d0)) !imagpart=fac*Sin(k_out*gcoord-(ijrot*pi/2.d0)) Call hankel(ijrot,arg,1,hnkl,dhnkl) !cgcoeff=cleb(j, l, jtotal, lambda, 0, lambda) cgcoeff=cleb(ijrot, ijrot, 0, 0, 0, 0) wftemp(itc)=fac*imag*hnkl*Sqrt(2.d0*ijrot+1.d0)*cgcoeff ENDDO ENDDO !CLOSE(output_unit0) !CLOSE(output_unit1) ! CLOSE(UNIT=output_unit0,IOSTAT=istat,STATUS="KEEP") ! IF (istat.ne.0) STOP 'S_wavepacket - CLOSE failed' !=============================================================================== ! Check Normalization by interpolating to a uniform grid. ! Would have to sort it to ascending order too. Time consuming! Return End Subroutine translational