!------------------------------------------------------------------- ! function : curvepot ! ! package : potentials ! ! Language : Fortran 90 ! ! author : F. Colavecchia (flavioc@lanl.gov) ! ! date : 01/29/03 version: ! revision : version: ! ! purpose : Compute the pontential curve of arrangement arr ! for a internuclear distance r between the ! atoms that compose the arrangement arr. ! ! input : arr -> arrangement (1 2 3) ! r -> internuclear distance, NOT mass scalesd ! ! output : curvepot -> V_arr(r) in a.u. ! ! modules : ! ! ! common : ! ! ! notes : ! !------------------------------------------------------------------- real*8 function curvepot(arr,r) use pes_module ! pesname must contain a character string ! of length 20 that properly describes the potential. ! implicit none integer arr real*8 r,vnene,vneh character(len=25) potname ! ! Check for correct potential energy surface specification. ! if(pesname.ne.potname)then write(*,*)'The potential energy surface name does not' write(*,*)' match the name in the potential energy surface routine.' write(*,*)'***error***: Execution stopped in routine curvepot' write(*,*) 'pesname=', pesname write(*,*) 'potname=', potname stop 'curvepot' end if if(arr.lt.1.or.arr.gt.3) then write(*,*) 'Invalid arrangement' write(*,*) 'arr =',arr stop 'curvepot' end if ! ! if(arr.eq.1) then curvepot = vnene(r) else if(arr.eq.2) then curvepot = vneh(r) else curvepot = vneh(r) end if ! the following is a special case ! v=0 return end