      module module
      parameter (maxorbcas=16,maxsym=8,maxsl=10)
      integer corr_tp(-3:4,-3:4)
      character(160),save :: ijcl1,mono1,info1,davec1,topo1,ess1
     *,ijcl21,ijcl31,ijcl41,dens1,det1,mat1
      character(80),save ::prefix,curr_sub
      character(40) :: form,stop
      character(4),allocatable :: atom0(:)
      integer natom
      character(8) :: gener,calcul
      character(4) :: liens
      character(5) :: intsy
      character(1) :: syspin=' '
      integer,save,allocatable,dimension(:,:) :: itsyml,image,images
      integer,save ::norb,noc,icpu,nvec,niter,mprint(10),ndet,ms2,ndetc
     *,its(maxsym,maxsym),nclasc,nclastp,nsym,iter,isym(8)
     *,ninac,nvirt,ninac2,nvirt2,igener,itest(100),sel,idist,idist2
      integer,allocatable,dimension(:),save ::
     *numin,numvir,ipp,ibinc,idetc,num1,jdetc,num0
      integer,allocatable,dimension(:,:),save :: c,il,ipc,ilp
     *,iloo,ilpp
      integer,allocatable,dimension(:,:,:),save :: iz
      logical(1),save :: ytana,ycl,ygendet,ydetv,ycaspair,ygenverif
     *,ytestgendet,ydens,ydens2,densonly
      logical(1),save,allocatable :: yac(:)
      double precision,save :: eref,enuc,sl(0:maxsl),sl2(0:maxsl)
     *,sli(0:maxsl),
     *corrf,corrf2,twvec,prec,si,twdens
      character(1000) zone(0:maxsl)
      logical t_zone
      logical(1),allocatable,dimension(:,:) :: yl
      character(300),allocatable :: loinfo(:)
      ! donnees concernant la partie active
      integer,save :: noac,nelac,numac(maxorbcas)
     *,noaco,noacv,nocac0,nocbc0,iclasc(-2:2,-2:2),iclasc1(2,19)
     *,idebc(19),ifinc(19),icltp(0:2,0:2,0:2,0:2),idimtp(36),isdimtp(36)
     *,icltp1(4,36),idimd(0:36),idimc(19),jdimc(19,0:2)
     *,jdebc(19,0:2),jfinc(19,0:2)
      integer(1),allocatable,dimension(:) :: jbin
      logical,save ::  exist_clasc(19)
      integer,save :: nlc,nlpair,nlpairp,nlco,nlcv,npp,npc
     *,nppaaaa,npp_pe,npp_te,npp_tepe
     *,npcoov,npcovv,npcoov_te,npcovv_pe
     *,nc_tp(19),ic_tp(6,19),nprint
      logical(1) :: ywcas=.false.
      integer,save,allocatable ::
     *ilc(:),ilpair(:,:),ilc1(:),reor_sel(:)
      ! type des integrales
      integer,dimension(3,3,3,3),save :: itypi
      integer,dimension(:),save,allocatable :: itype,num_oav
      integer ityiil1,is0
      ! listes conditionnelles
      integer,save,allocatable :: idebliscond(:),liscond(:)
     *,ifinliscond(:)
      ! listes d'adresses T/P dans les boucles internes
      integer,allocatable,dimension(:) :: itp1,itp2,itp3,itp4,itp5,itp6
      integer,allocatable,dimension(:) :: ijtp1,ijtp2,itp7,itp8
      integer(1),allocatable,dimension(:) :: ltp1,ltp2
      integer ntp1,ntp2,ntp3
      ! correction des adresses due a l'ordre des indices
      integer,save ::
     *corr_ttg,corr_ppg,corr_ttl,corr_ppl,corr_tte,corr_ppe,
     *corr_ttgp,corr_ppgt,corr_ttlp,corr_pplt,corr_ttep,corr_ppet,
     *corr_ttgaa,corr_ppgaa,corr_ttlaa,corr_pplaa,corr_tteaa,corr_ppeaa,
     *corr_ttgbb,corr_ppgbb,corr_ttlbb,corr_pplbb,corr_ttebb,corr_ppebb,
     *corr_ttgppg,corr_ttgppl,corr_ttlppg,corr_ttlppl,
     *corr_tteppg,corr_tteppl,corr_ttgppe,corr_ttlppe
     *,corr_tteppe,iispin(2,16),nessai,maxl0
      !
      !
      !
      logical,save :: ytot,w,w1,w2,w3,w4,w5,w6,w7,ysym=.false.
      integer,allocatable,dimension(:) :: mdetc1,mdetc2,msgnc
      double precision,allocatable,dimension(:,:) :: v1,v2
      double precision,allocatable,dimension(:) :: ee,vhab
      logical vhab_original
      logical lifock
 
 
 
      character(31) el1iil1(10000)
      integer iil1
      integer niil1
      integer :: iil1tot=0
      integer iil10(100)
      logical yiil1(100),yiil1lent
      logical(1),allocatable :: ycvl(:)
 
!     Habillage
      integer :: nhab=0
      integer :: hab
      integer :: iterh=0,mhab=1
      logical :: ycalmat3,yhmono=.false.
      double precision :: delta(8)
      integer,dimension(10) :: mprinth=0
 
      integer,save,dimension(8,8) :: dsym=  reshape(
     *                                      (/ 1, 1, 1, 1, 1, 1, 1, 1,
     *                                         1,-1, 1,-1, 1,-1, 1,-1,
     *                                         1, 1,-1,-1, 1, 1,-1,-1,
     *                                         1,-1,-1, 1, 1,-1,-1, 1,
     *                                         1, 1, 1, 1,-1,-1,-1,-1,
     *                                         1,-1, 1,-1,-1, 1,-1, 1,
     *                                         1, 1,-1,-1,-1,-1, 1, 1,
     *                                         1,-1,-1, 1,-1, 1, 1,-1/),
     *                                         (/8,8/))
      integer nsuiv
      logical ysuiv,y_suiv_run,ysuiv2
      real(8) suiv
 
      character(80) orthfile
 
      logical :: s2eigen=.true.
      logical :: uci=.false.
      real(8) lambda_uci1,lambda_uci0

      logical(1),dimension(20) :: debug=.false.
 
! Introduction de donnees pour que les subroutines puissent servir pour locci
      logical,parameter :: ylocci=.false.
      logical :: all_linked=.false.
      real(8) slid(0:maxsl)
      logical :: cond_occ=.false.
      end module module
