      subroutine mulfov(aa,a,i)
      use module
      use mod_ena
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      integer a
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Preparation des listes d'adresses du CAS et des TP
      !
      if(w)print*,'mulfov',i,a,shape(il)
      if(il(i,a)==0) return
      call caldfc(idist,0,0)
      call caldfc(idist2,1,1)
      if (iter>=iterh.and..not.ycalmat3) call classhab(1,1)
      itp1(1)=1
      itp2(1)=il(i,a)
      ! Partie CAS
      jcltp1=isdimtp(icltp(0,0,0,0))
      jcltp2=isdimtp(icltp(1,0,1,0))
      iclc=iclasc(0,0)
      longc=ifinc(iclc)+1-idebc(iclc)
      ! Appel a la boucle interne
      jsgn=1-2*mod(nocac0+ninac+num_oav(i),2)
      if(sel==2) then
         lc=0
         do k=idebc(iclc),ifinc(iclc)
            if(icaldist(k,jbin,ibinc,noac)>0) cycle
            lc=lc+1
            mdetc1(lc)=idetc(k)
         enddo
         call ena(aa*jsgn,lc,mdetc1(1:lc),
     *   mdetc1(1:lc),
     *   1,itp1+jcltp1,itp2+jcltp2)
      else
         call ena(aa*jsgn,longc,idetc(idebc(iclc):ifinc(iclc)),
     *   idetc(idebc(iclc):ifinc(iclc)),
     *   1,itp1+jcltp1,itp2+jcltp2)
      endif
      jcltp2=isdimtp(icltp(0,1,0,1))
      jsgn=1-2*mod(nocbc0+ninac+num_oav(i),2)
      if(sel==2) then
         lc=0
         do k=idebc(iclc),ifinc(iclc)
            if(icaldist(k,jbin,ibinc,noac)>0) cycle
            lc=lc+1
            mdetc1(lc)=idetc(k)
         enddo
         call ena(aa*jsgn,lc,mdetc1(1:lc),
     *   mdetc1(1:lc),
     *   1,itp1+jcltp1,itp2+jcltp2)
      else
         call ena(aa*jsgn,longc,idetc(idebc(iclc):ifinc(iclc)),
     *   idetc(idebc(iclc):ifinc(iclc)),
     *   1,itp1+jcltp1,itp2+jcltp2)
      endif
      hab=0
      return
      end
       subroutine mulfoc(aa,x,i)
      use module
      use mod_ena
      use mod_mula
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      integer x
      character(31) elmat(27)
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Preparation des listes d'adresses du CAS et des TP
      !
      !print*,'mulfoc',i,x,shape(il),aa
      if(ilc1(i)==0) return
      call caldfc(idist,1,0)
      call caldfc(idist2,0,0)
      if (iter>=iterh.and..not.ycalmat3) call classhab(1,0)
      itp1(1)=ilc1(i)
      itp2(1)=1
      ltp1(1)=1
      nntp(1)=1
      elmat(1)='I+    ->       |       ->      '
      call mula0(x,0,0,0)
      jsgn=1-mod(ninac-num_oav(i),2)*2
      call mula(aa1*jsgn,'+ o ',elmat,1,1,1)
      call mula(aa1*jsgn,'- o ',elmat,1,1,1,'I-')
      hab=0
      return
      end
       subroutine mulfxv(aa,x,i)
      use module
      use mod_ena
      use mod_mula
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      integer x
      character(31) elmat(27)
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Preparation des listes d'adresses du CAS et des TP
      !
      if(w)print*,'mulfxv',i,x,shape(il),aa
      if(ilc1(i)==0) return
      call caldfc(idist,0,0)
      call caldfc(idist2,0,1)
      if (iter>=iterh.and..not.ycalmat3) call classhab(0,1)
      itp2(1)=ilc1(i)
      itp1(1)=1
      ltp1(1)=1
      nntp(1)=1
      elmat(1)='      ->       |       -> A+   '
      call mula0(x,0,0,0)
      call mula(aa,'+ v ',elmat,1,1,1)
      call mula(aa,'- v ',elmat,1,1,1,'A-')
      hab=0
      return
      end
       subroutine mulfvv(aa,j,i)
      use module
      use mod_ena
      use mod_mula
      use mod_mulatp
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      character(31) elmat(27)
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Preparation des listes d'adresses du CAS et des TP
      !
      if(w)print*,'mulfvv',i,j,shape(il),aa
      if(ilc1(i)==0.or.ilc1(j)==0) return
      call caldfc(idist,0,1)
      call caldfc(idist2,0,1)
      itp1(1)=ilc1(i)
      itp2(1)=ilc1(j)
      ltp1(1)=1
      nntp(1)=1
      elmat(1)='      -> A+    |       -> B+   '
      call mulatp(aa,elmat,1,1,1)
      call mulatp(aa,elmat,1,1,1,'A-','B-')
      return
      end
       subroutine mulfxx(aa,x,y)
      use module
      use mod_ena
      use mod_mula
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      integer x,y
      character(31) elmat(27)
      !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Preparation des listes d'adresses du CAS et des TP
      !
      !w=.true.
      if(w)print*,'mulfxx',x,y,shape(il),aa
      call caldfc(idist,0,0)
      call caldfc(idist2,0,0)
      if(igener>0) then
         itp1(1)=1
         itp2(1)=1
         ltp1(1)=1
         nntp(1)=1
      endif
      elmat(1)='      ->       |       ->      '
      call mula0(x,0,y,0)
      call mula(aa,'+ + ',elmat,1,1,1)
      call mula(aa,'- - ',elmat,1,1,1)
      !w=.false.
      return
      end
