      subroutine qcio2mono(if_mono,ante)
      use mod_qcio
! declarations qcio
      character(2) ante
      character(300) qciofile
! declarations program
      real(8),allocatable,dimension(:,:) :: overlap
      real(8),allocatable,dimension(:) :: value
      integer(4),allocatable :: isym(:),idx(:,:)

!
! init
!
      if(mono1==' ')mono1=trim(prefix)//'MONO'
      cote=''''
      qciofile=trim(workdir)//trim(prefix)//'qcio'
!
!
! Read symmetry
!
      call qcio_get_symmetry_num_sym(nsym)
      print*,'nsym',nsym
      allocate(isym(nsym))
      call qcio_get_ao_num_orb_sym(isym)
      print*,'isym',isym
      norb=sum(isym(1:nsym))
      allocate(value(norb*(norb+1)/2))
      allocate(overlap(norb,norb))
      allocate(idx(norb*(norb+1)/2,2))
      print*,'isym',isym
      print*,'norb',norb
!
! Read overlap
!
      call qcio_get_ao_overlap(overlap)
      print*,'overlap'
      call script(overlap,norb,norb,norb,norb)
      call ecriS(if_mono,overlap,norb,mono1,'Qcio',.true.,nsym,isym,
     *(/(k,k=1,norb)/))

!
! Read OneInt
!


      if(ante=='MO') then
         call qcio_get_mo_one_int(overlap)
         print*,'OneInt'
         call script(overlap,norb,norb,norb,norb)
         call ecriS(-if_mono,overlap,norb,
     *   mono1,'Qcio',.false.,nsym,isym,
     *   (/(k,k=1,norb)/))
         rewind if_mono
      endif
      return
      end
