      subroutine comple(noac,numac,nca,ic,ncompl,icompl)
      IMPLICIT REAL*8(A-H,O-X,Z),LOGICAL*1 (Y)
      include 'maxorb.prm'
      dimension numac(noac)
      dimension ic(nca)
      dimension icompl(noac),ycompl(maxorb+maxorb)
      yw=.false.
      do k=1,noac
         ycompl(numac(k))=.true.
      enddo
      do k=1,nca
         ycompl(ic(k))=.not.ycompl(ic(k))
      enddo
      ncompl=0
      do k=1,noac
         if(ycompl(numac(k))) then
            ncompl=ncompl+1
            icompl(ncompl)=numac(k)
         endif
      enddo
      if(yw)write(6,*)'comple   ref',
     *(numac(k),k=1,noac),' sous',(ic(k),k=1,nca),
     *' icompl',(icompl(k),k=1,ncompl)
      return
      end
