      subroutine tesepv(nta,ita,iepv)
      dimension ita(2)
      if(nta.ne.2) return
      if(ita(1).eq.ita(2)) iepv=1
      return
      end
       subroutine epvc(nca,ica,nca0,ica0,iepvca)
      implicit real*8(a-h,o-x,z),logical*1(y)
      parameter(maxorbcas=16)
      include 'maxorb.prm'
      common /cs/ noac,nelac,numac(maxorbcas),itype(maxorb),is0,ms2
      dimension ica(maxorbcas),ica0(maxorbcas)
      yw=.false.
      if(yw) then
         write(6,*)'nca,nca0',nca,nca0
         write(6,*)'ica',(ica(k),k=1,nca)
         write(6,*)'ica0',(ica0(k),k=1,nca0)
      endif
      nca1=nca
      do i=1,nca0
         do j=1,nca
            if(ica(j).eq.ica0(i)) then
               iepvca=1
               goto 1
            endif
         enddo
         nca1=nca1+1
         if(nca1.gt.noac) return
         ica(nca1)=ica0(i)
 1       continue
      enddo
      nca=nca1
      if(yw) then
         write(6,*)'ica fin',(ica(k),k=1,nca)
      endif
      return
      end
