      subroutine accept(nca,ica,ncb,icb,nt,np,ynon)
c
c---------------------------------------------------------
c     verification de la conformite d'un determinant MR
c---------------------------------------------------------
c
      IMPLICIT REAL*8(A-H,O-X,Z),logical*1(y)
      PARAMETER (maxsym=8,maxorbcas=16,idicmr=35000)
      include 'maxorb.prm'
      parameter(ndimcs0=100000)
      common/mr3/ maxcmr(-2:2,maxsym,-2:2),mixtpmr(idicmr)
     *,ndetc,ndetc0,iadrc_mr(idicmr)
      common /prep/ nca0,ncb0,ic0(maxorbcas),icamun(maxorb+maxorb)
     *,numt(maxorb),nump(maxorb),nv
     *,gener,yoc(maxorb+maxorb),yrefc(maxorbcas),yac(maxorb)
     *,ygmono,ygddci,ygddc2,ygcas,ygtous
      character*4 gener
      common /adrcs/ ces(0:maxorbcas,0:maxorbcas),idimcs
     *,nim(ndimcs0),tpmrs
      character*1 tpmrs(ndimcs0)
      integer ces
      dimension ica(maxorbcas),icb(maxorbcas)
      dimension iocc(maxorbcas)
      dimension ic1(maxorbcas)
      yw=.false.
         if(yw)print*,'ica',(ica(k),k=1,nca)
         if(yw)print*,'ica',(icb(k),k=1,ncb)
      if(gener.eq.'MR') then
         call adrc_mr(nca,ica,ncb,icb,iadrcas)
         call callim(mixtpmr(iadrcas),maxt,maxp,mint,minp)
         ynon=nt.gt.maxt.or.np.gt.maxp.or.nt.lt.mint.or.np.lt.minp
         if(yw) then
            print*,'accept iadrcas,mixtpmr(iadrcas)',
     *      iadrcas,mixtpmr(iadrcas)
            print*,'accept nt,np',nt,np
            print*,'accept maxt,maxp,mint,minp',maxt,maxp,mint,minp
         endif
      else
         call tradmrs(iocc,nca,ica,ncb,icb)
         call adrcass(iocc,iadrs,ncf,nc1,ic1)
         if(yw)print*,'iocc',iocc
         if(yw)print*,'iadrs',iadrs
         mixtpmrs=ichar(tpmrs(iadrs))
         if(yw)print*,'mixtpmrs',mixtpmrs
         call sptxm(mint,maxt,minp,mixtpmrs)
         maxp=minp+maxt-mint
         ynon=nt.gt.maxt.or.np.gt.maxp.or.nt.lt.mint.or.np.lt.minp
         if(yw) then
            print*,'iocc',iocc
            print*,'accept iadrs,mixtpmrs'
     *      ,iadrs,mixtpmrs
            print*,'accept nt,np',nt,np
            print*,'accept maxt,maxp,mint,minp',maxt,maxp,mint,minp
         endif
      endif
      return
      end
 
