!------------------------------------------------------------------- ! function : dcurvepot ! ! package : potentials ! ! Language : Fortran 90 ! ! author : F. Colavecchia (flavioc@lanl.gov) ! ! date : 02/09/03 version: ! revision : version: ! ! purpose : Compute the derivative of the potential 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)/dr in a.u. ! ! modules : ! ! common : ! ! notes : ! !------------------------------------------------------------------- real*8 function dcurvepot(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,dvnene,vneh real*8 rp,delta character(len=25) potname delta = 1d-3*r rp = r+delta ! ! 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 'dcurvepot' end if ! ! if(arr.eq.1) then dcurvepot = dvnene(r) else dcurvepot = (vneh(rp)-vneh(r))/delta end if ! the following is a special case ! dcurvepot=0d0 return end