!------------------------------------------------------------------- ! subroutine: mpot ! ! package : li3 Potentials ! ! Language : Fortran 77 ! ! author : V. Venturi (vanessa.venturi@nist.gov) ! ! revision : F. Colavecchia (flavioc@lanl.gov) ! ! purpose : Get the potential of the singlet and triplet Li2, ! once the data and parameters are read at syspot3; ! according to eq. (8) of JCP 118 5484 (2003). ! ! input : np -> degree of polynomial used in the akima interpolation. ! ndata -> number of ab initio+rkr+exchange data points ! rdata -> distance in a.u. for each data point ! vdata -> potentials at each data point. ! c6 -> data for Van der Waals form, eq. (3) ! c8 -> data for Van der Waals form, eq. (3) ! c10 -> data for Van der Waals form, eq. (3) ! cA -> data for exchange form, eq. (6) ! beta -> data for exchange form, eq. (6) ! gamma -> data for exchange form, eq. (6) ! a -> data for short range form, eq. (7) ! b -> data for short range form, eq. (7) ! nv -> singlet (nv=1) or triplet (nv=2) potential ! r -> internuclear distance in a.u. ! ! output : v -> li2 potential in a.u. ! ! ! notes : The original code included RKR data from table 3 ! (Linton et al J. Mol. Spect. 196, 20 (1999)). ! Now we make use of new RKR data provided by A. Ross ! (ross@in2p3.fr), read from rkr.dat. See also ! readme_li2.txt for the values of De, Do, a, rmin. ! Comments noted by CFC were included by F. Colavecchia ! !------------------------------------------------------------------- subroutine mpot(np,ndata,rdata,vdata,c6,c8,c10, > CA,beta,gamma,a,b,nv,r,v) C double precision rdata,vdata,c6,c8,c10,CA,beta,gamma,a,b,r,v integer np,ndata,nv dimension rdata(ndata),vdata(ndata) C C ... Local Variables C double precision vex,vdisp,rfinal rfinal = rdata(ndata) C if(r.ge.0.0d0 .and. r.lt.rdata(1)) then ! ! Extrapolate short range data using the form: aexp(-br) ! v=a*exp(-b*r) elseif(r.ge.rdata(1) .and. r.lt.rfinal) then ! ! Interpolate short range data ! call akima(np,ndata,rdata,vdata,1,r,v) v=v/r**6 elseif(r.ge.rfinal) then ! ! Calculate long range form ! vex=CA*exp(-beta*r)*r**gamma vdisp=-c6/r**6-c8/r**8-c10/r**10 if(nv.eq.1) then v=vdisp-vex elseif(nv.eq.2) then v=vdisp+vex endif endif C return end !------------------------------------------------------------------- ! function : correction_ss ! ! package : li3 Potentials ! ! Language : Fortran 77 ! ! author : V. Venturi (vanessa.venturi@nist.gov) ! ! revision : F. Colavecchia (flavioc@lanl.gov) ! ! purpose : Harmonic correction for the potential. ! ! ! input : r -> interatomic distance in bohr. ! shift -> harmonic constant of the correction ! re -> distance at the minimum of the potential ! ! output : v -> correction potential ! !------------------------------------------------------------------- double precision function correction_ss(r,shift,re) implicit none double precision r,shift,c6,re correction_ss=0.0d0 if (r.lt.re) correction_ss=shift*(r-re)**2 return end !------------------------------------------------------------------- ! function : sort ! ! package : li3 Potentials ! ! Language : Fortran 77 ! ! author : V. Venturi (vanessa.venturi@nist.gov) ! ! purpose : sorting vector a and b in ascending order !------------------------------------------------------------------- subroutine sort(a,b,n) implicit none integer n,i,j real*8 a(n),atem,b(n),btem do 10 j=1,n do 20 i=1,n-j if (a(i).gt.a(i+1)) then atem=a(i+1) a(i+1)=a(i) a(i)=atem btem=b(i+1) b(i+1)=b(i) b(i)=btem end if 20 continue 10 continue return end !------------------------------------------------------------------- ! function : sort ! ! package : li3 Potentials ! ! Language : Fortran 77 ! ! author : V. Venturi (vanessa.venturi@nist.gov) ! ! purpose : sorting vector a,b and c in ascending order !------------------------------------------------------------------- subroutine sort2(a,b,c,n) implicit none integer n,i,j real*8 a(n),atem,b(n),btem,c(n),ctem do 10 j=1,n do 20 i=1,n-j if (a(i).gt.a(i+1)) then atem=a(i+1) a(i+1)=a(i) a(i)=atem btem=b(i+1) b(i+1)=b(i) b(i)=btem ctem=c(i+1) c(i+1)=c(i) c(i)=ctem end if 20 continue 10 continue return end