*dk surface
      subroutine surface_2APP(v,rij)
c this potential is for 1A' in Li3 potential
c for 2475 points in c2v, RMS=2.76d-4 Ha.
c for 55 other points in Cs, RMS=8.7d-4 Ha.
c written by X.L. li@nhn.ou.edu
c-----------------------------------------------------------------------
c This routine supplies the potential energy surface for the
c reactive scattering codes.
c
c On entering: The array rij contains the internuclear distances
c              in units of bohr (NOT mass scaled).
c
c              The common /pes/ must contain a character string
c              of length 20 that properly describes the potential.
c
c On Exit:     The variable v is the value of the potential energy
c              surface in Hartree atomic units.
c
c
c-----------------------------------------------------------------------
      implicit NONE
      REAL*8 rij(3),EHAMIL(37),v3b,v,x(3),vli2
c-----------------------------------------------------------------------
c This call to surfac supplies the potential energy surface
c for the particular system of interest.
c-----------------------------------------------------------------------
          
           x(1)=maxval(rij)
           x(3)=minval(rij)
           x(2)=max(min(rij(1),rij(2)),
     & min(rij(2),rij(3)),min(rij(1),rij(3)))

          call Vhamil_APP(Ehamil,x)
c          call TRI3B_2APP_NCNW(x(1),x(2),x(3),v3b)
c          IF(maxval(rij).lt.4d0.and.EHAMIL(1).gt.0.15d0)v3b=0d0
c          v=v3b+Ehamil(2)
          v=Ehamil(2)
      return
      end


