      subroutine mulcccc(x,y,z,t,aa)
      use module
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      dimension aa(3)
      integer x,y,z,t
      !symetrie de spin
      !Rem: s'il y a seult 2 indices differents, on ne passe pas ici
      ysp1=itest(21)==1
      ysp0=itest(21)==0
      ifac=1
      if(ysp1) ifac=2
      call mulccccd(x,y,z,t,aa(1)*ifac)
      call mulccccd(x,t,z,y,aa(1)*ifac)
      call mulccccd(x,y,t,z,aa(2)*ifac)
      call mulccccd(x,z,t,y,aa(2)*ifac)
      call mulccccd(x,z,y,t,aa(3)*ifac)
      call mulccccd(x,t,y,z,aa(3)*ifac)
      if(ysp0) then
         call mulccccd(y,x,t,z,aa(1))
         call mulccccd(t,x,y,z,aa(1))
         call mulccccd(y,x,z,t,aa(2))
         call mulccccd(z,x,y,t,aa(2))
         call mulccccd(z,x,t,y,aa(3))
         call mulccccd(t,x,z,y,aa(3))
      endif
      call mulccccx(x,y,z,t,aa(1)-aa(2))
      call mulccccx(x,t,y,z,aa(3)-aa(1))
      call mulccccx(x,z,y,t,aa(3)-aa(2))
      return
      end
       subroutine mulcecc(x,y,z,aa)
      use module
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      dimension aa(2)
      integer x,y,z
      !symetrie de spin
      !Rem: s'il y a seult 2 indices differents, on ne passe pas ici
      ysp1=itest(21)==1
      ysp0=itest(21)==0
      ifac=1
      if(ysp1) ifac=2
      call mulccccd(x,x,y,z,aa(1)*ifac)
      call mulccccd(y,x,x,z,aa(1)*ifac)
      call mulccccd(x,y,x,z,aa(2)*ifac)
      if(ysp0) then
         call mulccccd(x,x,z,y,aa(1))
         call mulccccd(x,y,z,x,aa(1))
         call mulccccd(y,x,z,x,aa(2))
      endif
      call mulccccx(y,x,z,x,aa(2)-aa(1))
      return
      end
 
 
