      subroutine sgn1
      parameter(maxsym=8,maxorb=500,maxorbcas=16)
      IMPLICIT REAL*8(A-H,O-X,Z),logical*1(y)
      common /orb/ enuc,eref,norb,noca,nocb
     *,iorb(2*maxorb),ninac,nvirt,noca0
      common/orb2/numina(maxorb),numvir(maxorb),iordo(maxorb*2)
     *,iodro(maxorb*2)
     *,numinb(maxorb),numvib(maxorb)
      common /cs/ noac,nelac,numac(maxorbcas),itype(maxorb),is0,ms2
      common/pr/nprint,mprint(10)
c
c-----------------------------------------------------------
c     calcul du signe : on reordonne les orbitales
c     pour avoir l'ordre
c     <--------alpha--------><---------beta-------->
c     <-occ-----CAS---virt--><-occ-----CAS---virt-->
c-----------------------------------------------------------
c
      yw=.false.
      io=0
      do i=1,ninac
         io=io+1
         iodro(numina(i))=io
      enddo
      do i=1,noac
         io=io+1
         iodro(numac(i))=io
      enddo
      do i=1,nvirt
         io=io+1
         iodro(numvir(i))=io
      enddo
      do i=1,norb
         iodro(i+norb)=iodro(i)+norb
      enddo
      do i=1,norb+norb
         iordo(iodro(i))=i
      enddo
      if(mod(iabs(is0),2).ne.0) then
         iordo(norb+norb+1)=norb+norb+1
         iodro(norb+norb+1)=norb+norb+1
      endif
      if(nprint.ge.1)write(6,1000)'iordo',(iordo(k),k=1,norb+norb)
      if(nprint.ge.1)write(6,1000)'iodro',(iodro(k),k=1,norb+norb)
 1000 format(a6,20i4,12(6x,20i4))
      return
      end
