      subroutine lirint
      use module
      use mod_lirint
      use mod_script
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      character(80) aa
      dimension ajk_act(16,16)
      yw=.false.
      !if(y_suiv_run) return
      allocate(num1(norb+2))
      do k=1,norb+2
         num1(k)=(k-1)*(k-2)/2
      enddo
      !
      ! Ouverture et lecture : Jij et Kij
      !
      open(29,status='old',form='unformatted',file=ijcl21)
      allocate(ajk(norb,norb),aijjj(norb,norb))
      read(29) ajk
      read(29) aijjj
      do i=1,noac
         io=numac(i)
         do j=1,noac
            jo=numac(j)
            ajk_act(i,j)=ajk(io,jo)
         enddo
      enddo
      print*,' '
      print*,'Jij and Kij matrices for active orbitals'
      call mscript(ajk_act(1:noac,1:noac))
      if(w2) then
         print*,'AJK'
         call script(ajk,norb,norb,norb,norb)
         print*,'AIJJJ'
         call script(aijjj,norb,norb,norb,norb)
      endif
      call regensym2(ajk,.false.)
      call regensym2(aijjj,.true.)
      if(w2) then
         print*,'AJK'
         call script(ajk,norb,norb,norb,norb)
         print*,'AIJJJ2'
         call script(aijjj,norb,norb,norb,norb)
      endif
      close(29)
      !
      ! Ouverture et lecture : integrales monoelectroniques
      !
      open(29,file=mono1,status='old',form='unformatted')
      allocate(hmono(norb,norb))
      call liS(-29,hmono,'SYM',norb)
C      long2=norb*(norb+1)/2
C      allocate(hmonol(long2),hmono(norb,norb))
C      if(w2)print*,'mono1 ',mono1
C         read(29) aa
C         if(w2)print*,aa
C      do
C         read(29) aa
C         if(w2)print*,aa
C         if(index(aa,'==ONEINT MATRIX (SYM)').ne.0) then
C            read(29)
C            read(29) hmonol
C            exit
C         endif
C         read(29)
C         read(29)
C      enddo
C      ii=0
C      do i=1,norb
C         do j=1,i
C            ii=ii+1
C            hmono(i,j)=hmonol(ii)
C            hmono(j,i)=hmonol(ii)
C         enddo
C      enddo
      if(w2) then
         print*,'   '
         print*,'hmono'
         call script(hmono,norb,norb,norb,norb)
      endif
C      deallocate (hmonol)
      return
      end
