      subroutine pargeo
      parameter (MAXPNT=2000)
      implicit double precision ( a-h,o-z )
      common /geocnv/ fmaxt,frmst,dmaxt,drmst,fgmin,fgmax,dgmin,dgmax,
     &                enmax,enmin,ngeoms,nepnts,igcvav,ifmxav,ifrmav,
     &                idmxav,idrmav,ieav,ifrav,mxpnt
      common /geocnv2/ formax(MAXPNT),forrms(MAXPNT),dismax(MAXPNT),
     &                 disrms(MAXPNT),epoints(MAXPNT),isav(MAXPNT)

      mxpnt = MAXPNT
      call parptr(3,fmaxt,fdum,idum)
      call parptr(151,formax,fdum,idum)

      return
      end

      subroutine proged(ipoints,iff,istat,
     &                  formax,forrms,dismax,disrms,epoints,isav,
     &                  coo,ianz)
C this is really progeo
      implicit double precision ( a-h,o-z )
      common /rdwr/   iun1,iun2,iun3,iun4,iun5
      integer xmol
      logical favail,oxyz,doconv,dozme,gusirc
      common /getpnt/ irtype,ipdbon,ipdbgro,xmol,favail,oxyz,
     &                doconv,dozme,gusirc
      logical gamess,gauss,mopac,molpot,elpot,chemx,oisbin,cpmd
     &        ,gamus,ctoz,adfin,chpot,qchem,orca
      common /choic/  mopac,gamess,gauss,molpot,elpot,chemx,cpmd,
     &                oisbin,gamus,ctoz,adfin,chpot,qchem,orca
      common /geocnv/ fmaxt,frmst,dmaxt,drmst,fgmin,fgmax,dgmin,dgmax,
     &                enmax,enmin,ngeoms,nepnts,igcvav,ifmxav,ifrmav,
     &                idmxav,idrmav,ieav,ifrav,mxpnt
      common /slagau/ ihasd,isgau,ido5d,ido7f,ido9g,ihasg
      common /xyzopt/ ixyz,ichx,icrtp,ipdbwh,iambch
      common /mopver/ mopopt
      dimension formax(*),forrms(*),dismax(*),disrms(*),epoints(*)
      dimension isav(*),coo(3,*),ianz(*)

      istat = -1
      if (gamess) then
          if (gamus) then
             call geogus(formax,forrms,dismax,disrms,epoints,isav)
          else
             call geogam(formax,forrms,dismax,disrms,epoints,isav)
          endif
      elseif (cpmd) then
          call geocpmd(formax,forrms,dismax,disrms,epoints,isav,
     &                 needm)
          if (needm.ne.-1) istat = needm
      elseif (gauss) then
          call geogau(formax,forrms,dismax,disrms,epoints,isav)
      elseif (qchem) then
          call geoqcm(formax,forrms,dismax,disrms,epoints,isav)
      elseif (orca) then
          call geoorc(formax,forrms,dismax,disrms,epoints,isav)
      elseif (mopac.and..not.doconv) then
          call geomop(
     &            formax,forrms,dismax,disrms,epoints,isav,coo,ianz)
      elseif (xmol.eq.1) then
          call geoxyz(0,iff,
     &            formax,forrms,dismax,disrms,epoints,isav,coo,ianz)
      elseif (xmol.eq.4) then
          ngeoms = 1
      elseif (xmol.eq.3) then
          call geoxyz(0,iff,
     &            formax,forrms,dismax,disrms,epoints,isav,coo,ianz)
      elseif (xmol.eq.2) then
          call geoxyz(-1,iff,
     &            formax,forrms,dismax,disrms,epoints,isav,coo,ianz)
      elseif (adfin) then
          if (ihasg.gt.0) then
             call geoxyz(ihasg,iff,
     &             formax,forrms,dismax,disrms,epoints,isav,coo,ianz)
             call gmmcnv(formax,forrms,dismax,disrms,epoints,isav)
          else
             ngeoms = 0
          endif
      elseif (icrtp.eq.5) then
          call geoxdt(formax,forrms,dismax,disrms,epoints,isav)
      elseif (icrtp.eq.3) then
          call geobio(formax,forrms,dismax,disrms,epoints,isav)
          call gmmcnv(formax,forrms,dismax,disrms,epoints,isav)
      elseif (icrtp.eq.2) then
          call geofdt(formax,forrms,dismax,disrms,epoints,isav)
          call gmmcnv(formax,forrms,dismax,disrms,epoints,isav)
      elseif (icrtp.eq.1) then
          call geochx(formax,forrms,dismax,disrms,epoints,isav)
          call gmmcnv(formax,forrms,dismax,disrms,epoints,isav)
      elseif (ipdbgro.eq.1) then
c done this already
          idum = 1
      elseif (mopac.and.mopopt.eq.4) then
          idum = 1
      else
          igcvav = 0
      endif

      if (cpmd.or.gamess.or.gauss.or.qchem.or.orca.or.
     &    (mopac.and..not.doconv).or.(mopac.and.mopopt.eq.4)) 
     &     call gmmcnv(formax,forrms,dismax,disrms,epoints,isav)


      ipoints = ngeoms

      return
      end
