c
c
c******************************************************************************
c     MODULE:PROGDEF
c******************************************************************************
c
      module progdef
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:  January 6, 2000 by P. L. Fast
c     Purpose:  To define the default electronic structure program called
c        for each multilevel method.
c
c     All are currently set to G98.  May be changed to G03 or G94 if convenient
c
c        for the user.
c
c     Called by:  defprog
c
      implicit none

c
c  SAC, MCSAC, IB, and MCCM calculations
c  Default for MCPROGRAM
c
      character*10, parameter :: defmcp = 'g09 '
c
c  G2 and MCG2 calculations
c  Default for G2PROGRAM
c
      character*10, parameter :: defg2p = 'g09 '
c
c  G3, MCG3, ,MC3BBO, G3SXMP3 and MC-QCISD calculations
c  Default for G3PROGRAM
c
      character*10, parameter :: defg3p = 'g09 '
c
c  HF portion of HF||MO
c  Default for HFMO-HFKEY-PROGRAM
c
      character*10, parameter :: defhfp = 'g09 '
c
c  MO portion of HF||MO
c  Default for HFMO-MOKEY-PROGRAM
c
      character*10, parameter :: defmop = 'g09 '
c
c  Higher Level calculation of IMOHC
c  Default for IMOHC-HLKEY-PROGRAM
c
      character*10, parameter :: defimohlp = 'g09 '
c
c  Lower Level calculation of IMOHC
c  Default for IMOHC-LLKEY-PROGRAM
c
      character*10, parameter :: defimollp = 'g09 '
c
c  External Geometry Optimization
c  Default for *EXTOPT-PROGRAM
c
      character*10, parameter :: defextoptp = 'g09 '
c
c  Test Calculations
c  Default for *TEST-PROGRAM
c
      character*10, parameter :: deftestp = 'g09 '
c
c  Low level Hessian
c  Default for *MULTIOPT-HPROG
c
      character*10, parameter :: defhessp = 'g09 '

      end module progdef
c
c        
c******************************************************************************
c     MODULE:NUMFMT
c******************************************************************************
c
      module numfmt
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:
c     Purpose:  To define the types of formatted numbers found in G98 and
c        G94 formatted checkpoint files.
c
c     Called by:  cfltfmt, g98oute, mg98oute, g98outg, g98outh, g98outo
c
c
      implicit none
c
c  Sets parameters for the different  type of number formats to be read.
c
      integer, parameter :: efmt = 1
      integer, parameter :: gfmt = 2
      integer, parameter :: hfmt = 3
c
c  Gives locations of signs, decimal points, and numbers in the formatted
c    checkpoint file when the number is an energy, a gradient, or a 
c    hessian.
c

      integer :: isign(3), inum(3), idec(3), decbeg(3), decfin(3)
      integer :: iexp(3), iesign(3), expbeg(3), expfin(3)

      data isign  / 1, 1, 1/
      data inum   / 2, 2, 2/
      data idec   / 3, 3, 3/
      data decbeg / 4, 4, 4/
      data decfin /18,11,11/
      data iexp   /19,12,12/
      data iesign /20,13,13/
      data expbeg /21,14,14/
      data expfin /22,15,15/
c
c  Gives length of the initial label, the starting point of the energy,
c    and the length of the floating point numbers in Test.FChk.
c
      integer :: llen(3), nstrt(3), nlen(3)

      data llen   /30, 0, 0/
      data nstrt  /50, 0, 0/
      data nlen   /22,15,15/

      end module numfmt
c
c
c******************************************************************************
c     MODULE:INPUT
c******************************************************************************
c
      module input
c     
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:  January 6, 2000 by P. L. Fast
c     Purpose:  To define the structures that the input information will
c        be placed in.  Also saves the multilevel optimization input info
c        from access to access.
c     
      implicit none

      integer, parameter :: maxatm = 50
c
c  Input for all the possible different programs to be called.
c
      type proglist
         character*10 :: mcprog, g2prog, g3prog, hfprog, moprog, 
     *       imohlprog, imollprog, extoptprog, testprog, hessprog
      end type proglist
c
c  The geometry of the molecule (and all other information needed to write
c    the geom into an input file).
c
      type cartgeom
         integer             natoms
         integer             charge
         integer             mult
         character*2         atm(maxatm)
         double precision    atmmss(maxatm)
         double precision    angcoord(3*maxatm)
         double precision    aucoord(3*maxatm)
      end type cartgeom
c
c  The NEB method options                                               0706NG04
c
      type nebopt                                                       0706NG04
         type (cartgeom) :: rgeom, pgeom                                0706NG04
         integer nimg                                                   0706NG04
         integer nebiter                                                0706NG04
         integer interp, nebalg, optm                                   0706NG04
         double precision kspr                                          0706NG04
         character*20 rfile, pfile                                      0706NG04
         character*20 imgfile                                           0706NG04
      end type nebopt                                                   0706NG04
c
c  The Multilevel optimization options.
c
      type mlopt
         integer  algrthm, iop, htyp, reorient
         character*20  mlmeth, hmeth, hbas
         double precision  dlx2, gcomp, scale, stptol, hscale
         double precision  rmin, rmax, omin, ddmax, ddmaxts                YZ02
         integer  hrec, niter, retry, sdstrt, ihunit,iupd
         integer constant(3*maxatm)
         character*80  optl(5)
         type (nebopt)  :: nebinp                                       0706NG04 
         integer nebset                                                 0706NG04
      end type mlopt
c      
c  External optimization options.
c
      type extopt
         character*20  meth, bas
         character*80  optl(5)
      end type extopt
c
c
c  General section input information.
c
      type general
         character*80  mtitle(5)
         integer  geomunit, geomtype
         type (cartgeom) :: geom
         integer  lener, lgrad, lhess, lopt, lextopt
         integer lprsum                                                 0418PJ01
      end type general
c
c  A set of switches for 6 multi-coefficient methods.
c
      type mctype
         integer  lib, lsac, lmcsac
         integer  lmccmco, lmccmnm, lmccmut
         integer  lcoop
      end type mctype
c
c  A set of switches for the gaussian-type calculations.
c
      type mgtype
      integer  lg2, lmcg2, lg3, lmcg3, lg3sxmp3, lmc3bb,lmc3mpw         1011YZ03
         integer  lmqcisd                                               0106PF00
         integer  lmcomp2                                               0627PJ00
         integer  lmcco                                                 0711BL02
      end type mgtype
c
c  A structure to define each of the 3 harmonic interactions in IMOHC
c    (along a bond, an angle, and a torsion).
c
      type hcinf
         double precision  k, eqval
         integer atoms(4)
      end type hcinf
c
c  The input information about IMOHC
c
      type imoinf
         integer ssatm(maxatm),lsatm(maxatm),capatm,ssnatm,lsnatm
         character*20  hlmeth, hlbas, llmeth, llbas
         character*80  hloptl(5), lloptl(5)
         type (hcinf) :: bond, angle, tors
      end type imoinf
c
c  Input for HF||MO
c
      type hfmoinf
         integer  lhfmo
         character*20  hfkbas, mokmeth
         character*80  hfkoptl(5), mokoptl(5)
         double precision  frachf
      end type hfmoinf
c
c  Input for SAC, MCSAC, IB, and MCCM methods
c
      type mcinf
         character*5   version
         character*20  meth, bas1, bas2, bas3
         double precision  coef(10)
         integer  stdm, stdb1, stdb2, stdb3
      end type mcinf
c
c  Input for G2 and G3
c
      type ginf
         character*80 optl(5)
         integer alpha, beta
      end type ginf      
c
c  Input for MCG2 and MCG3 and MC-QCISD                                 0106PF00
c   G3SXMP3 and MC3BB                                                  1010YZ03
c  Only one structure is used for each pair of mc and mmc calculations.
c  The options for G2/MCG2 will be identical and the same is true
c      for the G3 series.
c     
      type mginf
         character*5   version
         character*80  optl(5)
         double precision  mcoef(9)
         double precision  mqcoef(4)                                    0110PF00
         double precision  mcomp2coef(4)                                0627PJ00
         double precision  mccocoef(4)                                  0711BL02
         double precision  g3sxmp3coef(5)                               1011YZ03
         double precision  mc3bbcoef(2)                                 1011YZ03
         double precision  mc3mpwcoef(2)                                1011YZ03
      end type mginf

c
c  The information structure utilized by optehk, optghk, and opthhk to
c    make their call to the appropriate Multilevel method.
c
      type mloptinf
         type (proglist)  :: progrms
         type (cartgeom)  :: geom
         character*20     :: mlmeth
         type (hfmoinf)   :: hfmoinp
         character*80     :: mcoptl(5), toptl(5)
         type (mcinf)     :: mcinp
         type (ginf)      :: ginp
         type (mginf)     :: mginp, mqinp                               0112PF00
         type (imoinf)    :: imohcinp
         integer          :: htyp
         character*20     :: hbas, hmeth, tbas, tmeth
         double precision :: hscale
      end type mloptinf

      type (mloptinf) :: mlinp

      save  mlinp


      end module input
c
c
c******************************************************************************
c     MODULE:FILES
c******************************************************************************
c
      module files
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:
c     Purpose:  To define all the files and filehandles to be used
c       throughout Multilevel. 
c
      implicit none 

      integer, parameter :: infile = 5, outfile = 6
      integer, parameter :: g98inf = 11, g98outf = 12        
      integer, parameter :: g98in2f = 15, g98out2f = 16                  1023BL00
      integer, parameter :: g94inf = 13, g94outf = 14
      integer, parameter :: g03inf = 17, g03outf = 18                    0913YZ03
      integer, parameter :: g09inf = 21, g09outf = 22                   0808RMP12
      integer, parameter :: extoinf = 7, extoout = 8
      integer, parameter :: fchk = 19, fchk2 = 20                        1023BL00
      integer, parameter :: sumfile = 25                                 0418PJ01
      integer, parameter :: iuimg = 26                                   0712NG04

c      character*5, parameter :: emem = '100MB'                          0102BL01
c      character*5, parameter :: gmem = '250MB'                          0102BL01
c      character*5, parameter :: hmem = '500MB'                          0102BL01
c      character*5, parameter :: omem = '500MB'                          0102BL01

      character*6, parameter :: mlin = 'ml.inp'
      character*6, parameter :: mlout = 'ml.out'
      character*7, parameter :: g98in = 'g98.inp'
      character*7, parameter :: g98out = 'g98.out'
      character*13, parameter :: g98in2 = 'par/g98_2.inp'                1023BL00
      character*13, parameter :: g98out2 = 'par/g98_2.out'               1023BL00
      character*7, parameter :: g03in = 'g03.inp'                        0913YZ03
      character*7, parameter :: g03out = 'g03.out'                       0913YZ03
      character*7, parameter :: g09in = 'g09.inp'                       0808RMP12
      character*7, parameter :: g09out = 'g09.out'                      0808RMP12
      character*7, parameter :: g94in = 'g94.inp'
      character*7, parameter :: g94out = 'g94.out'
      character*10, parameter :: extin = 'extopt.inp'
      character*10, parameter :: extout = 'extopt.out'
      character*6, parameter :: mlsum = 'ml.sum'                         0418PJ01

      character*9, parameter :: testfchk = 'Test.FChk'
      character*13, parameter :: testfchk2 = 'par/Test.FChk'             1023BL00

c      character*30, parameter :: pDZsloc = './pdz+.gbs'
      character*30, parameter :: mpDZloc = './mpdz.gbs'                 0808RMP12
      character*30, parameter :: g3Lloc = './g3large.gbs'
      character*30, parameter :: mg3loc = './mg3.gbs'
      character*30, parameter :: mg3sloc = './mg3s.gbs'                  0224BL02
      character*30, parameter :: g3XLloc = './g3xlarge.gbs'              1010YZ03
      end module files
c
c
c******************************************************************************
c     MODULE:GPARAM  
c******************************************************************************
c
      module gparam
c 
c     Created:  Summer 1999 by J. M. Rodgers 
c     Revised:  Feb. 24, 2002 by B. J. Lynch
c     Purpose:  To define all the methods and basis sets used in G2, G3S,
c       MCG2, G3, MCG3, MC-QCISD calculations.  And also set the default 
c       coefficients for the _MC_ methods.
c
      implicit none

      integer, parameter :: nummg2es = 10

      character*20 mg2esml(nummg2es), fmg2esml(nummg2es)
      character*20 mg2basl(nummg2es), fmg2basl(nummg2es)

c
c  Lists out the e.s. theory and basis set for each of the 10 mcg2 calcs
c  f___ indicates a formatted list for printing output
c
      data mg2esml 
     * /'hf ',
     *  'mp2 ',
     *  'mp4sdq ',
     *  'mp4 ',
     *  'qcisd(t) ',
     *  'mp2 ',
     *  'mp4sdq ',
     *  'mp4 ',
     *  'hf ',
     *  'mp2 '/

      data fmg2esml /'HF','MP2','MP4SDQ','MP4','QCISD(T)','MP2',
     *    'MP4SDQ','MP4','HF','MP2'/

      data mg2basl 
     * /'6-311g(d,p) ',
     *  '6-311g(d,p) ',  
     *  '6-311g(d,p) ',
     *  '6-311g(d,p) ',
     *  '6-311g(d,p) ',
     *  '6-311g(2df,p) ',
     *  '6-311g(2df,p) ',
     *  '6-311g(2df,p) ',
     *  '6-311+g(3df,2p) ',
     *  '6-311+g(3df,2p) '/

      data fmg2basl /'6-311G(d,p)','6-311G(d,p)','6-311G(d,p)',
     *  '6-311G(d,p)','6-311G(d,p)','6-311G(2df,p)','6-311G(2df,p)',
     *  '6-311G(2df,p)','6-311+G(3df,2p)','6-311+G(3df,2p)'/

      integer, parameter :: nummg3es = 9

      character*20 mg3esml(nummg3es), fmg3esml(nummg3es)
      character*20 mg3basl(nummg3es), fmg3basl(nummg3es)

      character*20 mg3esml_3(nummg3es-1), fmg3esml_3(nummg3es-1)        0224BL02
      character*20 mg3basl_3(nummg3es-1), fmg3basl_3(nummg3es-1)        0224BL02
c
c  Lists out the e.s. theory and basis set for each of the 9 mcg3 calcs
C  _3 are for version-3 of MCG3                                         0224BL02
c  f___ indicates a formatted list for printing output
c
      data mg3esml
     * /'hf ',
     *  'mp2 ',
     *  'mp4sdq ',
     *  'mp4 ',   
     *  'qcisd(t) ',
     *  'mp2 ',   
     *  'mp4sdq ',
     *  'hf ',
     *  'mp2 '/

      data fmg3esml /'HF','MP2','MP4SDQ','MP4','QCISD(T)','MP2',
     *   'MP4SDQ','HF','MP2'/

      data mg3basl
     * /'6-31g(d) ',
     *  '6-31g(d) ',   
     *  '6-31g(d) ',   
     *  '6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(2df,p) ',
     *  '6-31g(2df,p) ',
     *  'mg3 ',
     *  'mg3 '/   

      data fmg3basl /'6-31G(d)','6-31G(d)','6-31G(d)','6-31G(d)',
     *  '6-31G(d)','6-31G(2df,p)','6-31G(2df,p)','MG3','MG3'/

      data mg3esml_3                                                    0224BL02
     * /'hf ',                                                          0224BL02
     *  'mp2 ',                                                         0224BL02
     *  'mp4sdq ',                                                      0224BL02
     *  'qcisd(t) ',                                                    0224BL02
     *  'mp2 ',                                                         0224BL02
     *  'mp4sdq ',                                                      0224BL02
     *  'hf ',                                                          0224BL02
     *  'mp2 '/                                                         0224BL02

      data fmg3esml_3 /'HF','MP2','MP4SDQ','QCISD(T)','MP2',            0224BL02
     *   'MP4SDQ','HF','MP2'/                                           0224BL02

      data mg3basl_3                                                    0224BL02
     * /'6-31g(d) ',                                                    0224BL02
     *  '6-31g(d) ',                                                    0224BL02
     *  '6-31g(d) ',                                                    0224BL02
     *  '6-31g(d) ',                                                    0224BL02
     *  '6-31g(2df,p) ',                                                0224BL02
     *  '6-31g(2df,p) ',                                                0224BL02
     *  'mg3s ',                                                        0224BL02
     *  'mg3s '/                                                        0224BL02

      data fmg3basl_3 /'6-31G(d)','6-31G(d)','6-31G(d)','6-31G(d)',     0224BL02
     *  '6-31G(2df,p)','6-31G(2df,p)','MG3S','MG3S'/                    0224BL02

      integer, parameter :: nummqces = 4                                0106PF00

      character*20 mqcesml(nummqces), fmqcesml(nummqces)                0106PF00
      character*20 mqcbasl(nummqces), fmqcbasl(nummqces)                0106PF00

      character*20 mqcesml_3(nummqces+1), fmqcesml_3(nummqces+1)        0224BL02
      character*20 mqcbasl_3(nummqces+1), fmqcbasl_3(nummqces+1)        0224BL02
c
c Lists the e.s. theory and basis sets for each of the 5 mcqcisd calcs 
c f___ indicates a formatted list for printing output
c
      data mqcesml                                                      0106PF00
     * /'hf ',                                                          0106PF00
     *  'mp2 ',                                                         0106PF00
     *  'qcisd ',                                                       0106PF00
     *  'mp2 '/                                                         0106PF00

      data fmqcesml /'HF','MP2','QCISD','MP2'/                          0106PF00

      data mqcbasl                                                      0106PF00
     * /'6-31G(d) ',                                                    0106PF00
     *  '6-31G(d) ',                                                    0106PF00
     *  '6-31G(d) ',                                                    0106PF00
     *  'mg3 '/                                                         0106PF00

      data fmqcbasl /'6-31G(d)','6-31G(d)','6-31G(d)',                  0106PF00
     *  'MG3'/                                                          0106PF00


      data mqcesml_3                                                    0224BL02
     * /'hf ',                                                          0224BL02
     *  'mp2 ',                                                         0224BL02
     *  'qcisd ',                                                       0224BL02
     *  'hf ',                                                          0224BL02
     *  'mp2 '/                                                         0224BL02

      data fmqcesml_3 /'HF','MP2','QCISD','HF','MP2'/                   0224BL02

      data mqcbasl_3                                                    0224BL02
     * /'6-31G(d) ',                                                    0224BL02
     *  '6-31G(d) ',                                                    0224BL02
     *  '6-31G(d) ',                                                    0224BL02
     *  'mg3s ',                                                        0224BL02
     *  'mg3s '/                                                        0224BL02

      data fmqcbasl_3 /'6-31G(d)','6-31G(d)','6-31G(d)',                0224BL02
     *  'MG3S','MG3S'/                                                  0224BL02


      integer, parameter :: nummcomp2es = 4                             0711PJ00
      integer, parameter :: nummccoes = 4                               0711BL02

      character*20 mcomp2esml(nummcomp2es), fmcomp2esml(nummcomp2es)    0627PJ00
      character*20 mcomp2basl(nummcomp2es), fmcomp2basl(nummcomp2es)    0627PJ00

      character*20 mcomp2esml_3(nummcomp2es), fmcomp2esml_3(nummcomp2es)0224BL02
      character*20 mcomp2basl_3(nummcomp2es), fmcomp2basl_3(nummcomp2es)0224BL02

      character*20 mccoesml(nummccoes), fmccoesml(nummccoes)            0711BL02
      character*20 mccobasl(nummccoes), fmccobasl(nummccoes)            0711BL02

c
c List the e.s. theory and basis sets for mccm-co-mp2 calcs
c f___ indicates a formatted list for printing output
c

      data mcomp2esml                                                   0627PJ00
     * /'hf ',                                                          0711PJ00
     *  'mp2 ',                                                         0711PJ00
     *  'hf ',                                                          0711PJ00
     *  'mp2 '/                                                         0711PJ00 
      data fmcomp2esml /'HF','MP2','HF','MP2'/                          0711PJ00
      data mcomp2basl                                                   0711PJ00
     * /'6-31+G(d) ',                                                   0711PJ00
     *  '6-31+G(d) ',                                                   0711PJ00
     *  'mg3 ',                                                         0711PJ00
     *  'mg3 '/                                                         0711PJ00
      data fmcomp2basl /'6-31+G(d)','6-31+G(d)','MG3','MG3'/            0711PJ00 


      data mcomp2esml_3                                                 0224BL02
     * /'hf ',                                                          0224BL02
     *  'mp2 ',                                                         0224BL02
     *  'hf ',                                                          0224BL02
     *  'mp2 '/                                                         0224BL02 
      data fmcomp2esml_3 /'HF','MP2','HF','MP2'/                        0224BL02
      data mcomp2basl_3                                                 0224BL02
     * /'6-31+G(d) ',                                                   0224BL02
     *  '6-31+G(d) ',                                                   0224BL02
     *  'mg3s ',                                                        0224BL02
     *  'mg3s '/                                                        0224BL02
      data fmcomp2basl_3 /'6-31+G(d)','6-31+G(d)','MG3S','MG3S'/        0224BL02 



      data mccoesml                                                     0711BL02
     * /'hf ',                                                          0711BL02
     *  'mp2 ',                                                         0711BL02
     *  'hf ',                                                          0711BL02
     *  'mp2 '/                                                         0711BL02
      data fmccoesml /'HF','MP2','HF','MP2'/                            0711BL02
      data mccobasl                                                     0711BL02
     * /'6-31G(2d) ',                                                   0711BL02
     *  '6-31G(2d) ',                                                   0711BL02
     *  'mg3s ',                                                        0711BL02
     *  'mg3s '/                                                        0711BL02
      data fmccobasl /'6-31G(2d)','6-31G(2d)','MG3S','MG3S'/            0711BL02


      integer, parameter :: numg2es = 8

      character*20 g2esml(numg2es), fg2esml(numg2es)  
      character*20 g2basl(numg2es), fg2basl(numg2es)
c
c  Lists out the e.s. theory and basis set for each of the 8 g2 calcs
c  f___ indicates a formatted list for printing output
c
      data g2esml
     * /'mp2 ',   
     *  'mp4 ',
     *  'qcisd(t) ',
     *  'mp2 ',
     *  'mp4 ',
     *  'mp2 ',
     *  'mp4 ',
     *  'mp2 '/
     
      data fg2esml /'MP2','MP4','QCISD(T)','MP2','MP4','MP2',
     *  'MP4','MP2'/

      data g2basl
     * /'6-311g(d,p) ',  
     *  '6-311g(d,p) ',
     *  '6-311g(d,p) ',
     *  '6-311+g(d,p) ',
     *  '6-311+g(d,p) ',
     *  '6-311g(2df,p) ',
     *  '6-311g(2df,p) ',
     *  '6-311+g(3df,2p) '/
      
      data fg2basl /'6-311G(d,p)','6-311G(d,p)','6-311G(d,p)',
     *  '6-311+G(d,p)','6-311+G(d,p)','6-311G(2df,p)',
     *  '6-311G(2df,p)','6-311+G(3df,2p)'/
      
      integer, parameter :: phlc = 9

      integer, parameter :: numg3es = 8

      character*20 g3esml(numg3es), fg3esml(numg3es)
      character*20 g3basl(numg3es), fg3basl(numg3es)
c
c  Lists out the e.s. theory and basis set for each of the 8 g3 calcs
c  f___ indicates a formatted list for printing output
c
      data g3esml
     * /'mp2 ',
     *  'mp4 ',
     *  'qcisd(t) ',
     *  'mp2 ',
     *  'mp4 ',
     *  'mp2 ',
     *  'mp4 ',
     *  'mp2(full)'/

      data fg3esml /'MP2','MP4','QCISD(T)','MP2','MP4','MP2','MP4',
     *  'MP2(full)'/

      data g3basl
     * /'6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31+g(d) ',
     *  '6-31+g(d) ',
     *  '6-31g(2df,p) ',
     *  '6-31g(2df,p) ',
     *  'g3large '/

      data fg3basl /'6-31G(d)','6-31G(d)','6-31G(d)','6-31+G(d)',
     *  '6-31+G(d)','6-31G(2df,p)','6-31G(2df,p)','G3Large'/

      integer, parameter :: numg3sxmp3es =10 

      character*20 g3sxmp3esml(numg3sxmp3es),
     *  fg3sxmp3esml(numg3sxmp3es)
      character*20 g3sxmp3basl(numg3sxmp3es),
     *  fg3sxmp3basl(numg3sxmp3es)

c
c  Lists out the e.s. theory and basis set for each of the 10 g3sxmp3 calcs
c  f___ indicates a formatted list for printing output
c
      data g3sxmp3esml
     * /'hf ',
     *  'mp2 ',
     *  'mp3 ',
     *  'mp4 ',
     *  'qcisd(t) ',
     *  'mp2 ',
     *  'mp3 ',
     *  'hf ',
     *  'mp2(full) ',
     *  'hf '/

      data fg3sxmp3esml /'HF','MP2','MP3','MP4','QCISD(T)','MP2',
     *  'MP3','HF','MP2(full)','HF'/

      data g3sxmp3basl
     * /'6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(d) ',
     *  '6-31g(2df,p) ',
     *  '6-31g(2df,p) ',
     *  'g3large ',
     *  'g3large ',
     *  'g3xlarge '/

      data fg3sxmp3basl /'6-31G(d)','6-31G(d)','6-31G(d)','6-31G(d)',
     *  '6-31G(d)','6-31G(2df,p)','6-31G(2df,p)','G3Large',
     *  'G3Large', 'G3XLarge'/


      integer, parameter :: nummc3bbes = 3

      character*20 mc3bbesml(nummc3bbes),
     *  fmc3bbesml(nummc3bbes)
      character*20 mc3bbbasl(nummc3bbes),
     *  fmc3bbbasl(nummc3bbes)
 
      data mc3bbesml                                                    0711YZ03
     * /'hf ',                                                          0711YZ03
     *  'mp2 ',                                                         0711YZ03
     *  'bb95 '/                                                        0711YZ03
      data fmc3bbesml /'HF','MP2','BB95'/                               0711YZ03
      data mc3bbbasl                                                    0711YZ03
     *  /'6-31+g(d,p) ',                                                0711YZ03
     *  '6-31+g(d,p)  ',                                                0711YZ03
     *  'mg3s '/                                                        0711YZ03
      data fmc3bbbasl /'6-31+G(d,p)','6-31+G(d,p)','MG3S'/              0711YZ03
     
      integer, parameter :: nummc3mpwes = 3

      character*20 mc3mpwesml(nummc3mpwes),
     *  fmc3mpwesml(nummc3mpwes)
      character*20 mc3mpwbasl(nummc3mpwes),
     *  fmc3mpwbasl(nummc3mpwes)

      data mc3mpwesml                                                   0711YZ03
     * /'hf ',                                                          0711YZ03
     *  'mp2 ',                                                         0711YZ03
     *  'mpwpw91 '/                                                     0711YZ03
      data fmc3mpwesml /'HF','MP2','MPWPW91'/                           0711YZ03
      data mc3mpwbasl                                                   0711YZ03
     *  /'6-31+g(d,p) ',                                                0711YZ03
     *  '6-31+g(d,p)  ',                                                0711YZ03
     *  'mg3s '/                                                        0711YZ03
      data fmc3mpwbasl /'6-31+G(d,p)','6-31+G(d,p)','MG3S'/             0711YZ03

      integer, parameter :: pso  = 10
      integer, parameter :: g1m   = 1
      integer, parameter :: g1sc  = 2
      integer, parameter :: g2m   = 3
      integer, parameter :: g2s   = 4
      integer, parameter :: g2sc  = 5
      integer, parameter :: gchos = 6
      integer, parameter :: g3m   = 7
      integer, parameter :: g3s   = 8

      double precision mc2defc(10,9)                                     0224BL02
      double precision mc3defc(10,8)                                     0224BL02
      double precision mqcdefc(10,4)                                     0224BL02 
      double precision mcomp2defc(10,4)                                  0224BL02 
      double precision mccodefc(10,4)                                    0711BL02 
      double precision g3sdefc(10,6)                                     0224BL02 
      double precision g3sxmp3defc(10,5)                                 1011YZ03
      double precision mc3bbdefc(10,2)                                   0711YZ03
      double precision mc3mpwdefc(10,2)                                   0711YZ03

      data mc2defc(g1m,1) /0.9949d0/,
     *     mc2defc(g1m,2) /0.9642d0/,
     *     mc2defc(g1m,3) /1.1414d0/,
     *     mc2defc(g1m,4) /1.0396d0/,
     *     mc2defc(g1m,5) /1.0784d0/,
     *     mc2defc(g1m,6) /3.6766d0/,
     *     mc2defc(g1m,7) /0.6666d0/,
     *     mc2defc(g1m,8) /3.3428d0/,
     *     mc2defc(g1m,9) /1.1427d0/

      data mc2defc(g1sc,1) /0.9911d0/,
     *     mc2defc(g1sc,2) /1.0329d0/,
     *     mc2defc(g1sc,3) /1.1498d0/,
     *     mc2defc(g1sc,4) /1.0160d0/,
     *     mc2defc(g1sc,5) /1.0242d0/,
     *     mc2defc(g1sc,6) /3.4914d0/,
     *     mc2defc(g1sc,7) /0.3824d0/,
     *     mc2defc(g1sc,8) /3.1698d0/,
     *     mc2defc(g1sc,9) /1.0826d0/

      data mc2defc(g2m,1)  /0.9926d0/,
     *     mc2defc(g2m,2)  /0.6149d0/,
     *     mc2defc(g2m,3)  /1.1703d0/,
     *     mc2defc(g2m,4)  /0.9968d0/,
     *     mc2defc(g2m,5)  /1.0233d0/,
     *     mc2defc(g2m,6)  /4.6485d0/,
     *     mc2defc(g2m,7)  /0.5703d0/,
     *     mc2defc(g2m,8)  /4.3440d0/,
     *     mc2defc(g2m,9)  /1.2560d0/

      data mc2defc(g2s,1) /0.9932d0/,
     *     mc2defc(g2s,2) /0.6787d0/,
     *     mc2defc(g2s,3) /1.1695d0/,
     *     mc2defc(g2s,4) /0.9901d0/,
     *     mc2defc(g2s,5) /0.9980d0/,
     *     mc2defc(g2s,6) /4.4804d0/,
     *     mc2defc(g2s,7) /0.5096d0/,
     *     mc2defc(g2s,8) /4.2274d0/,
     *     mc2defc(g2s,9) /1.2598d0/

      data mc2defc(g2sc,1) /0.9900d0/,
     *     mc2defc(g2sc,2) /0.7229d0/,
     *     mc2defc(g2sc,3) /1.1715d0/,
     *     mc2defc(g2sc,4) /0.9504d0/,
     *     mc2defc(g2sc,5) /1.0366d0/,
     *     mc2defc(g2sc,6) /4.1810d0/,
     *     mc2defc(g2sc,7) /0.4366d0/,
     *     mc2defc(g2sc,8) /3.8767d0/,
     *     mc2defc(g2sc,9) /1.2064d0/

      data mc2defc(gchos,1) /0.9922d0/,
     *     mc2defc(gchos,2) /0.5822d0/,
     *     mc2defc(gchos,3) /1.1349d0/,
     *     mc2defc(gchos,4) /1.3589d0/,
     *     mc2defc(gchos,5) /0.8900d0/,
     *     mc2defc(gchos,6) /4.4271d0/,
     *     mc2defc(gchos,7) /0.4245d0/,
     *     mc2defc(gchos,8) /3.4042d0/,
     *     mc2defc(gchos,9) /1.1790d0/

      data mc2defc(g3m,1) /1.0144d0/,
     *     mc2defc(g3m,2) /1.1576d0/,
     *     mc2defc(g3m,3) /1.0266d0/,
     *     mc2defc(g3m,4) /1.1630d0/,
     *     mc2defc(g3m,5) /1.3435d0/,
     *     mc2defc(g3m,6) /1.4462d0/,
     *     mc2defc(g3m,7) /1.6410d0/,
     *     mc2defc(g3m,8) /1.2324d0/,
     *     mc2defc(g3m,9) /1.1482d0/

      data mc2defc(g3s,1) /1.0146d0/,
     *     mc2defc(g3s,2) /1.1567d0/,
     *     mc2defc(g3s,3) /1.0258d0/,
     *     mc2defc(g3s,4) /1.1589d0/,
     *     mc2defc(g3s,5) /1.3331d0/,
     *     mc2defc(g3s,6) /1.2197d0/,
     *     mc2defc(g3s,7) /1.5563d0/,
     *     mc2defc(g3s,8) /1.6337d0/,
     *     mc2defc(g3s,9) /1.1578d0/

      data mc3defc(g2m,1)  /1.0121d0/,
     *     mc3defc(g2m,2)  /1.2047d0/,
     *     mc3defc(g2m,3)  /1.0646d0/,
     *     mc3defc(g2m,4)  /1.0975d0/,
     *     mc3defc(g2m,5)  /1.1859d0/,
     *     mc3defc(g2m,6)  /0.8139d0/,
     *     mc3defc(g2m,7)  /1.4470d0/,
     *     mc3defc(g2m,8)  /1.4142d0/

      data mc3defc(g2s,1) /1.0096d0/,
     *     mc3defc(g2s,2) /1.2246d0/,
     *     mc3defc(g2s,3) /1.0637d0/,
     *     mc3defc(g2s,4) /1.1363d0/,
     *     mc3defc(g2s,5) /1.1506d0/,
     *     mc3defc(g2s,6) /0.5224d0/,
     *     mc3defc(g2s,7) /1.3219d0/,
     *     mc3defc(g2s,8) /1.3980d0/

      data mc3defc(g2sc,1) /1.0080d0/,
     *     mc3defc(g2sc,2) /1.2750d0/,
     *     mc3defc(g2sc,3) /1.0661d0/,
     *     mc3defc(g2sc,4) /1.0998d0/,
     *     mc3defc(g2sc,5) /1.1330d0/,
     *     mc3defc(g2sc,6) /0.8006d0/,
     *     mc3defc(g2sc,7) /1.1689d0/,
     *     mc3defc(g2sc,8) /1.3192d0/

      data mc3defc(gchos,1) /1.0054d0/,                                 1211BL00
     *     mc3defc(gchos,2) /0.9060d0/,                                 1211BL00
     *     mc3defc(gchos,3) /1.0527d0/,                                 1211BL00
     *     mc3defc(gchos,4) /1.2504d0/,                                 1211BL00
     *     mc3defc(gchos,5) /0.9272d0/,                                 1211BL00
     *     mc3defc(gchos,6) /0.4746d0/,                                 1211BL00
     *     mc3defc(gchos,7) /1.0165d0/,                                 1211BL00
     *     mc3defc(gchos,8) /1.5713d0/                                  1211BL00

      data mc3defc(g3m,1) /1.0073d0/,                                   0805BL02
     *     mc3defc(g3m,2) /1.1172d0/,                                   0805BL02
     *     mc3defc(g3m,3) /1.0588d0/,                                   0805BL02
     *     mc3defc(g3m,4) /1.1951d0/,                                   0805BL02
     *     mc3defc(g3m,5) /1.1212d0/,                                   0805BL02
     *     mc3defc(g3m,6) /0.8412d0/,                                   0805BL02
     *     mc3defc(g3m,7) /1.3058d0/                                    0805BL02

      data mc3defc(g3s,1) /1.0067d0/,                                   0805BL02
     *     mc3defc(g3s,2) /1.1249d0/,                                   0805BL02
     *     mc3defc(g3s,3) /1.0585d0/,                                   0805BL02
     *     mc3defc(g3s,4) /1.2027d0/,                                   0805BL02
     *     mc3defc(g3s,5) /1.1369d0/,                                   0805BL02
     *     mc3defc(g3s,6) /0.5024d0/,                                   0805BL02
     *     mc3defc(g3s,7) /1.2666d0/                                    0805BL02
 
      data g3sxmp3defc(g3s,1) /1.0502d0/,                               1011YZ03    
     *     g3sxmp3defc(g3s,2) /1.1854d0/,                               1011YZ03
     *     g3sxmp3defc(g3s,3) /1.0803d0/,                               1011YZ03   
     *     g3sxmp3defc(g3s,4) /1.2027d0/,                               1011YZ03
     *     g3sxmp3defc(g3s,5) /1.0081d0/                                1011YZ03

      data mc3bbdefc(g3s,1) /0.205d0/,                                  1011YZ03
     *     mc3bbdefc(g3s,2) /1.332d0/                                   1011YZ03

      data mc3mpwdefc(g3s,1) /0.266d0/,                                 1011YZ03
     *     mc3mpwdefc(g3s,2) /1.339d0/                                  1011YZ03


      data mqcdefc(g2m,1)   /1.0038d0/,
     *     mqcdefc(g2m,2)   /1.0940d0/,
     *     mqcdefc(g2m,3)   /1.2047d0/,
     *     mqcdefc(g2m,4)   /1.0441d0/

      data mqcdefc(gchos,1)   /1.0173d0/,                               0224BL02
     *     mqcdefc(gchos,2)   /0.9304d0/,                               0224BL02
     *     mqcdefc(gchos,3)   /1.3959d0/,                               0224BL02
     *     mqcdefc(gchos,4)   /0.4421d0/                                0224BL02

      data mqcdefc(g3m,1)   /1.0325d0/,                                 0224BL02
     *     mqcdefc(g3m,2)   /1.1357d0/,                                 0224BL02
     *     mqcdefc(g3m,3)   /1.2226d0/,                                 0224BL02
     *     mqcdefc(g3m,4)   /1.2208d0/                                  0224BL02

      data mqcdefc(g3s,1)   /1.0452d0/,                                 0224BL02
     *     mqcdefc(g3s,2)   /1.1305d0/,                                 0224BL02
     *     mqcdefc(g3s,3)   /1.2302d0/,                                 0224BL02
     *     mqcdefc(g3s,4)   /1.1673d0/                                  0224BL02

      data mcomp2defc(g2m,1)  /0.9724d0/,                               0627PJ00
     *     mcomp2defc(g2m,2)  /1.2936d0/,                               0627PJ00
     *     mcomp2defc(g2m,3)  /0.8577d0/,                               0627PJ00
     *     mcomp2defc(g2m,4)  /2.0067d0/                                0627PJ00

      data mcomp2defc(g3m,1)  /1.0000d0/,                               0224BL02
     *     mcomp2defc(g3m,2)  /1.1567d0/,                               0224BL02
     *     mcomp2defc(g3m,3)  /0.8396d0/,                               0224BL02
     *     mcomp2defc(g3m,4)  /1.7925d0/                                0224BL02

      data mcomp2defc(g3s,1)  /1.0000d0/,                               0224BL02
     *     mcomp2defc(g3s,2)  /1.2095d0/,                               0224BL02
     *     mcomp2defc(g3s,3)  /0.8433d0/,                               0224BL02
     *     mcomp2defc(g3s,4)  /1.7821d0/                                0224BL02

      data g3sdefc(g2s,1)     /1.0596d0/,                               1211BL00
     *     g3sdefc(g2s,2)     /1.1504d0/,                               1211BL00
     *     g3sdefc(g2s,3)     /1.0868d0/,                               1211BL00
     *     g3sdefc(g2s,4)     /1.1477d0/,                               1211BL00
     *     g3sdefc(g2s,5)     /1.3780d0/,                               1211BL00
     *     g3sdefc(g2s,6)     /0.9529d0/                                1211BL00

      data mccodefc(gchos,1)    /1.0000d0/,                             0711BL02 
     *     mccodefc(gchos,2)    /1.4898d0/,                             0711BL02
     *     mccodefc(gchos,3)    /0.8374d0/,                             0711BL02
     *     mccodefc(gchos,4)    /1.9225d0/                              0711BL02

      data mccodefc(g3s,1)    /1.0000d0/,                               0711BL02 
     *     mccodefc(g3s,2)    /0.9436d0/,                               0711BL02
     *     mccodefc(g3s,3)    /0.8677d0/,                               0711BL02
     *     mccodefc(g3s,4)    /1.8814d0/                                0711BL02

      data mccodefc(g3m,1)    /1.0000d0/,                               0711BL02 
     *     mccodefc(g3m,2)    /0.9383d0/,                               0711BL02
     *     mccodefc(g3m,3)    /0.8595d0/,                               0711BL02
     *     mccodefc(g3m,4)    /1.9054d0/                                0711BL02

      end module gparam
c
c
c******************************************************************************
c     MODULE:PARAM 
c******************************************************************************
c
      module param
c 
c     Created:  Summer 1999 by J. M. Rodgers 
c     Revised: 
c     Purpose:  To define parameters for each type of MC calculations to
c        be done as well as parameters for the methods and bases used and 
c        the default coefficients to be used.
c        Strings are assigned to give the names of these methods, etc.
c
      implicit none
c
c  5 chosen to represent saddle point to follow Polyrate standard
c
      integer, parameter :: linear=1, nonlin=2, lints=5, nonlints=6
      integer, parameter :: uniths = 0, lowhs=1, highhs=2

      integer, parameter :: maxatm = 50

      integer, parameter :: pmco = 1
      integer, parameter :: pmnm = 2
      integer, parameter :: pmut = 3
      integer, parameter :: pib  = 4
      integer, parameter :: pmcs = 5
      integer, parameter :: psac = 6

      integer, parameter :: pccsdt  = 1
      integer, parameter :: pmp4    = 2
      integer, parameter :: pccsd   = 3
      integer, parameter :: pmp4sdq = 4
      integer, parameter :: pmp2    = 5
      integer, parameter :: phf     = 6

      integer, parameter :: v1s   = 1
      integer, parameter :: v1sc  = 2
      integer, parameter :: v2m   = 3
      integer, parameter :: v2s   = 4
      integer, parameter :: v2sc  = 5
      integer, parameter :: cho   = 6
      integer, parameter :: v3m   = 7
      integer, parameter :: v3s   = 8


      integer, parameter :: ptz  = 1
      integer, parameter :: pdz  = 2
c      integer, parameter :: pdzs = 3
      integer, parameter :: mpdz = 3                                    0808RMP12
      integer, parameter :: dz   = 4

      integer, parameter :: nodef = 0
      integer, parameter :: def = 1

      integer, parameter :: na   =  0
      integer, parameter :: nstd = -1

      integer, parameter :: numes = 6
      integer, parameter :: numbas = 3
      integer, parameter :: nummc = 6
 
      integer, parameter :: numcalc = 44
c
c  Defining the default coefficients for SAC, MCSAC, IB, and MCCM
c
      double precision sacdefc(8,6,4)                                                   0711BL02
      double precision mcsdefc(8,5,2,4)
      double precision ibdefa
      double precision ibdefb(-1:6)
      double precision mcodefc(8,6,10)
      double precision mutdefc(8,5,7)
      double precision mnmdefc(8,7)

c
      data sacdefc(v1s,pmp2,pdz) /1.2877d0/,
     *     sacdefc(v1s,pmp2,ptz) /1.0578d0/,
     *     sacdefc(v1s,pmp4sdq,pdz) /1.4308d0/,
     *     sacdefc(v1s,pmp4sdq,ptz) /1.1854d0/,
     *     sacdefc(v1s,pmp4,pdz) /1.3355d0/,
     *     sacdefc(v1s,pmp4,ptz) /1.0853d0/,
     *     sacdefc(v1s,pccsd,pdz) /1.4497d0/,
     *     sacdefc(v1s,pccsd,ptz) /1.2022d0/,
     *     sacdefc(v1s,pccsdt,pdz) /1.3656d0/,
     *     sacdefc(v1s,pccsdt,ptz) /1.1201d0/
c
      data sacdefc(v1sc,pmp2,pdz) /1.2768d0/,
     *     sacdefc(v1sc,pmp2,ptz) /1.0482d0/,
     *     sacdefc(v1sc,pmp4sdq,pdz) /1.4189d0/,
     *     sacdefc(v1sc,pmp4sdq,ptz) /1.1747d0/,
     *     sacdefc(v1sc,pmp4,pdz) /1.3243d0/,
     *     sacdefc(v1sc,pmp4,ptz) /1.0756d0/,
     *     sacdefc(v1sc,pccsd,pdz) /1.4375d0/,
     *     sacdefc(v1sc,pccsd,ptz) /1.1915d0/,
     *     sacdefc(v1sc,pccsdt,pdz) /1.3542d0/,
     *     sacdefc(v1sc,pccsdt,ptz) /1.1100d0/
c
      data sacdefc(v2m,pmp2,pdz) /1.2318d0/,
     *     sacdefc(v2m,pmp2,ptz) /1.0090d0/,
     *     sacdefc(v2m,pmp4sdq,pdz) /1.4370d0/,
     *     sacdefc(v2m,pmp4sdq,ptz) /1.1880d0/,
     *     sacdefc(v2m,pmp4,pdz) /1.3306d0/,
     *     sacdefc(v2m,pmp4,ptz) /1.0739d0/,
     *     sacdefc(v2m,pccsd,pdz) /1.4665d0/,
     *     sacdefc(v2m,pccsd,ptz) /1.2125d0/,
     *     sacdefc(v2m,pccsdt,pdz) /1.3716d0/,
     *     sacdefc(v2m,pccsdt,ptz) /1.1181d0/
c
      data sacdefc(v2s,pmp2,pdz) /1.2373d0/,
     *     sacdefc(v2s,pmp2,ptz) /1.0138d0/,
     *     sacdefc(v2s,pmp4sdq,pdz) /1.4431d0/,
     *     sacdefc(v2s,pmp4sdq,ptz) /1.1933d0/,
     *     sacdefc(v2s,pmp4,pdz) /1.3362d0/,
     *     sacdefc(v2s,pmp4,ptz) /1.0788d0/,
     *     sacdefc(v2s,pccsd,pdz) /1.4727d0/,
     *     sacdefc(v2s,pccsd,ptz) /1.2178d0/,
     *     sacdefc(v2s,pccsdt,pdz) /1.3774d0/,
     *     sacdefc(v2s,pccsdt,ptz) /1.1232d0/
c
      data sacdefc(v2sc,pmp2,pdz) /1.2181d0/,
     *     sacdefc(v2sc,pmp2,ptz) /0.9970d0/,
     *     sacdefc(v2sc,pmp4sdq,pdz) /1.4209d0/,
     *     sacdefc(v2sc,pmp4sdq,ptz) /1.1737d0/,
     *     sacdefc(v2sc,pmp4,pdz) /1.3156d0/,
     *     sacdefc(v2sc,pmp4,ptz) /1.0610d0/,
     *     sacdefc(v2sc,pccsd,pdz) /1.4501d0/,
     *     sacdefc(v2sc,pccsd,ptz) /1.1979d0/,
     *     sacdefc(v2sc,pccsdt,pdz) /1.3562d0/,
     *     sacdefc(v2sc,pccsdt,ptz) /1.1047d0/

      data sacdefc(cho,pmp2,pdz)    /1.2660d0/, 
     *     sacdefc(cho,pmp2,ptz)    /1.1753d0/,
     *     sacdefc(cho,pmp4sdq,pdz) /1.3980d0/, 
     *     sacdefc(cho,pmp4sdq,ptz) /1.1569d0/,
     *     sacdefc(cho,pmp4,pdz)    /1.3245d0/,
     *     sacdefc(cho,pmp4,ptz)    /1.0711d0/,
     *     sacdefc(cho,pccsd,pdz)   /1.4308d0/,
     *     sacdefc(cho,pccsd,ptz)   /1.1801d0/,
     *     sacdefc(cho,pccsdt,pdz)  /1.3586d0/,
     *     sacdefc(cho,pccsdt,ptz)  /1.1064d0/,
     *     sacdefc(cho,pmp2,dz)     /1.1526d0/                                    


      data sacdefc(v3m,pmp2,pdz)    /1.2638d0/,                                   0711BL02
     *     sacdefc(v3m,pmp2,ptz)    /1.0219d0/,
     *     sacdefc(v3m,pmp4sdq,pdz) /1.4281d0/, 
     *     sacdefc(v3m,pmp4sdq,ptz) /1.1569d0/,
     *     sacdefc(v3m,pmp4,pdz)    /1.3394d0/,
     *     sacdefc(v3m,pmp4,ptz)    /1.0766d0/,
     *     sacdefc(v3m,pccsd,pdz)   /1.4573d0/,
     *     sacdefc(v3m,pccsd,ptz)   /1.1997d0/,
     *     sacdefc(v3m,pccsdt,pdz)  /1.3753d0/,
     *     sacdefc(v3m,pccsdt,ptz)  /1.1156d0/,
     *     sacdefc(v3m,pmp2,dz)     /1.1478d0/                                    0711BL02


      data sacdefc(v3s,pmp2,pdz)    /1.2672d0/,                                  
     *     sacdefc(v3s,pmp2,ptz)    /1.0255d0/, 
     *     sacdefc(v3s,pmp4sdq,pdz) /1.4320d0/,
     *     sacdefc(v3s,pmp4sdq,ptz) /1.1808d0/,                                   
     *     sacdefc(v3s,pmp4,pdz)    /1.3430d0/,
     *     sacdefc(v3s,pmp4,ptz)    /1.0803d0/,
     *     sacdefc(v3s,pccsd,pdz)   /1.4613d0/,
     *     sacdefc(v3s,pccsd,ptz)   /1.2036d0/,                                   
     *     sacdefc(v3s,pccsdt,pdz)  /1.3790d0/,
     *     sacdefc(v3s,pccsdt,ptz)  /1.1193d0/,
     *     sacdefc(v3s,pmp2,dz)     /1.1512d0/                                    0711BL02


c
      data mcsdefc(v1sc,pccsd,pdz,1) /1.4174d0/,
     *     mcsdefc(v1sc,pccsd,pdz,2) /1.2403d0/,
     *     mcsdefc(v1sc,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(v1sc,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(v1sc,pccsd,ptz,1) /1.1406d0/,
     *     mcsdefc(v1sc,pccsd,ptz,2) /0.7433d0/,
     *     mcsdefc(v1sc,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(v1sc,pccsd,ptz,4) /0.0000d0/
c
      data mcsdefc(v1sc,pccsdt,pdz,1) /1.3055d0/,
     *     mcsdefc(v1sc,pccsdt,pdz,2) /1.7800d0/,
     *     mcsdefc(v1sc,pccsdt,pdz,3) /3.0180d0/,
     *     mcsdefc(v1sc,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(v1sc,pccsdt,ptz,1) /1.0513d0/,
     *     mcsdefc(v1sc,pccsdt,ptz,2) /1.2183d0/,
     *     mcsdefc(v1sc,pccsdt,ptz,3) /2.1835d0/,
     *     mcsdefc(v1sc,pccsdt,ptz,4) /0.0000d0/
c
      data mcsdefc(v2m,pmp4sdq,pdz,1) /1.3740d0/,
     *     mcsdefc(v2m,pmp4sdq,pdz,2) /0.9849d0/,
     *     mcsdefc(v2m,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(v2m,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(v2m,pmp4sdq,ptz,1) /1.1326d0/,
     *     mcsdefc(v2m,pmp4sdq,ptz,2) /0.8114d0/,
     *     mcsdefc(v2m,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(v2m,pmp4sdq,ptz,4) /0.0000d0/
c
      data mcsdefc(v2m,pmp4,pdz,1) /0.0000d0/,
     *     mcsdefc(v2m,pmp4,pdz,2) /0.0000d0/,
     *     mcsdefc(v2m,pmp4,pdz,3) /0.0000d0/,
     *     mcsdefc(v2m,pmp4,pdz,4) /0.0000d0/,
     *     mcsdefc(v2m,pmp4,ptz,1) /1.0899d0/,
     *     mcsdefc(v2m,pmp4,ptz,2) /1.1081d0/,
     *     mcsdefc(v2m,pmp4,ptz,3) /0.9541d0/,
     *     mcsdefc(v2m,pmp4,ptz,4) /0.0000d0/
c
      data mcsdefc(v2m,pccsd,pdz,1) /1.3866d0/,
     *     mcsdefc(v2m,pccsd,pdz,2) /0.9543d0/,
     *     mcsdefc(v2m,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(v2m,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(v2m,pccsd,ptz,1) /1.1415d0/,
     *     mcsdefc(v2m,pccsd,ptz,2) /0.7796d0/,
     *     mcsdefc(v2m,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(v2m,pccsd,ptz,4) /0.0000d0/
c
      data mcsdefc(v2m,pccsdt,pdz,1) /0.0000d0/,
     *     mcsdefc(v2m,pccsdt,pdz,2) /0.0000d0/,
     *     mcsdefc(v2m,pccsdt,pdz,3) /0.0000d0/,
     *     mcsdefc(v2m,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(v2m,pccsdt,ptz,1) /1.0818d0/,
     *     mcsdefc(v2m,pccsdt,ptz,2) /1.0123d0/,
     *     mcsdefc(v2m,pccsdt,ptz,3) /1.3836d0/,
     *     mcsdefc(v2m,pccsdt,ptz,4) /0.0000d0/
c
      data mcsdefc(v2s,pmp4sdq,pdz,1) /1.3727d0/,
     *     mcsdefc(v2s,pmp4sdq,pdz,2) /0.9387d0/,
     *     mcsdefc(v2s,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(v2s,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(v2s,pmp4sdq,ptz,1) /1.1299d0/,
     *     mcsdefc(v2s,pmp4sdq,ptz,2) /0.7626d0/,
     *     mcsdefc(v2s,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(v2s,pmp4sdq,ptz,4) /0.0000d0/
c
      data mcsdefc(v2s,pmp4,pdz,1) /0.0000d0/,
     *     mcsdefc(v2s,pmp4,pdz,2) /0.0000d0/,
     *     mcsdefc(v2s,pmp4,pdz,3) /0.0000d0/,
     *     mcsdefc(v2s,pmp4,pdz,4) /0.0000d0/,
     *     mcsdefc(v2s,pmp4,ptz,1) /1.0880d0/,
     *     mcsdefc(v2s,pmp4,ptz,2) /1.0538d0/,
     *     mcsdefc(v2s,pmp4,ptz,3) /0.9363d0/,
     *     mcsdefc(v2s,pmp4,ptz,4) /0.0000d0/
c
      data mcsdefc(v2s,pccsd,pdz,1) /1.3852d0/,
     *     mcsdefc(v2s,pccsd,pdz,2) /0.9121d0/,
     *     mcsdefc(v2s,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(v2s,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(v2s,pccsd,ptz,1) /1.1388d0/,
     *     mcsdefc(v2s,pccsd,ptz,2) /0.7353d0/,
     *     mcsdefc(v2s,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(v2s,pccsd,ptz,4) /0.0000d0/
c
      data mcsdefc(v2s,pccsdt,pdz,1) /0.0000d0/,
     *     mcsdefc(v2s,pccsdt,pdz,2) /0.0000d0/,
     *     mcsdefc(v2s,pccsdt,pdz,3) /0.0000d0/,
     *     mcsdefc(v2s,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(v2s,pccsdt,ptz,1) /1.0769d0/,
     *     mcsdefc(v2s,pccsdt,ptz,2) /0.9761d0/,
     *     mcsdefc(v2s,pccsdt,ptz,3) /1.4314d0/,
     *     mcsdefc(v2s,pccsdt,ptz,4) /0.0000d0/
c



      data mcsdefc(v3m,pmp4sdq,pdz,1) /1.3747d0/,
     *     mcsdefc(v3m,pmp4sdq,pdz,2) /0.9511d0/,
     *     mcsdefc(v3m,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(v3m,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(v3m,pmp4sdq,ptz,1) /1.1366d0/,
     *     mcsdefc(v3m,pmp4sdq,ptz,2) /0.8621d0/,
     *     mcsdefc(v3m,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(v3m,pmp4sdq,ptz,4) /0.0000d0/

      data mcsdefc(v3s,pmp4sdq,pdz,1) /1.3734d0/,
     *     mcsdefc(v3s,pmp4sdq,pdz,2) /0.9093d0/,
     *     mcsdefc(v3s,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(v3s,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(v3s,pmp4sdq,ptz,1) /1.1334d0/,
     *     mcsdefc(v3s,pmp4sdq,ptz,2) /0.8108d0/,
     *     mcsdefc(v3s,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(v3s,pmp4sdq,ptz,4) /0.0000d0/

      data mcsdefc(cho,pmp4sdq,pdz,1) /1.3885d0/,
     *     mcsdefc(cho,pmp4sdq,pdz,2) /1.2652d0/,
     *     mcsdefc(cho,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(cho,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(cho,pmp4sdq,ptz,1) /1.1228d0/,
     *     mcsdefc(cho,pmp4sdq,ptz,2) /0.8285d0/,
     *     mcsdefc(cho,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(cho,pmp4sdq,ptz,4) /0.0000d0/



c
      data mcsdefc(v2sc,pmp4sdq,pdz,1) /1.3573d0/,
     *     mcsdefc(v2sc,pmp4sdq,pdz,2) /0.9644d0/,
     *     mcsdefc(v2sc,pmp4sdq,pdz,3) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4sdq,pdz,4) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4sdq,ptz,1) /1.1169d0/,
     *     mcsdefc(v2sc,pmp4sdq,ptz,2) /0.7875d0/,
     *     mcsdefc(v2sc,pmp4sdq,ptz,3) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4sdq,ptz,4) /0.0000d0/




      data mcsdefc(v3m,pmp4,ptz,1) /1.1023d0/,
     *     mcsdefc(v3m,pmp4,ptz,2) /1.1119d0/,
     *     mcsdefc(v3m,pmp4,ptz,3) /0.8192d0/,
     *     mcsdefc(v3m,pmp4,ptz,4) /0.0000d0/,
     *     mcsdefc(v3s,pmp4,ptz,1) /1.1000d0/,
     *     mcsdefc(v3s,pmp4,ptz,2) /1.0539d0/,
     *     mcsdefc(v3s,pmp4,ptz,3) /0.7969d0/,
     *     mcsdefc(v3s,pmp4,ptz,4) /0.0000d0/
     *     mcsdefc(cho,pmp4,ptz,1) /1.1042d0/,
     *     mcsdefc(cho,pmp4,ptz,2) /1.0377d0/,
     *     mcsdefc(cho,pmp4,ptz,3) /0.5628d0/,
     *     mcsdefc(cho,pmp4,ptz,4) /0.0000d0/

c
      data mcsdefc(v2sc,pmp4,pdz,1) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4,pdz,2) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4,pdz,3) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4,pdz,4) /0.0000d0/,
     *     mcsdefc(v2sc,pmp4,ptz,1) /1.0775d0/,
     *     mcsdefc(v2sc,pmp4,ptz,2) /1.0621d0/,
     *     mcsdefc(v2sc,pmp4,ptz,3) /0.8829d0/,
     *     mcsdefc(v2sc,pmp4,ptz,4) /0.0000d0/
c
      data mcsdefc(v3m,pccsd,pdz,1) /1.3900d0/,
     *     mcsdefc(v3m,pccsd,pdz,2) /0.9366d0/,
     *     mcsdefc(v3m,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(v3m,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(v3m,pccsd,ptz,1) /1.1472d0/,
     *     mcsdefc(v3m,pccsd,ptz,2) /0.8347d0/,
     *     mcsdefc(v3m,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(v3m,pccsd,ptz,4) /0.0000d0/
c
      data mcsdefc(v3s,pccsd,pdz,1) /1.3886d0/,
     *     mcsdefc(v3s,pccsd,pdz,2) /0.8993d0/,
     *     mcsdefc(v3s,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(v3s,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(v3s,pccsd,ptz,1) /1.1440d0/,
     *     mcsdefc(v3s,pccsd,ptz,2) /0.7897d0/,
     *     mcsdefc(v3s,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(v3s,pccsd,ptz,4) /0.0000d0/
c
      data mcsdefc(cho,pccsd,pdz,1) /1.4063d0/,
     *     mcsdefc(cho,pccsd,pdz,2) /1.2066d0/,
     *     mcsdefc(cho,pccsd,pdz,3) /0.0000d0/,
     *     mcsdefc(cho,pccsd,pdz,4) /0.0000d0/,
     *     mcsdefc(cho,pccsd,ptz,1) /1.1323d0/,
     *     mcsdefc(cho,pccsd,ptz,2) /0.7868d0/,
     *     mcsdefc(cho,pccsd,ptz,3) /0.0000d0/,
     *     mcsdefc(cho,pccsd,ptz,4) /0.0000d0/
c

      data mcsdefc(v2sc,pccsdt,pdz,1) /0.0000d0/,
     *     mcsdefc(v2sc,pccsdt,pdz,2) /0.0000d0/,
     *     mcsdefc(v2sc,pccsdt,pdz,3) /0.0000d0/,
     *     mcsdefc(v2sc,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(v2sc,pccsdt,ptz,1) /1.0712d0/,
     *     mcsdefc(v2sc,pccsdt,ptz,2) /0.9688d0/,
     *     mcsdefc(v2sc,pccsdt,ptz,3) /1.2601d0/,
     *     mcsdefc(v2sc,pccsdt,ptz,4) /0.0000d0/

      data mcsdefc(cho,pccsdt,pdz,1) /1.3157d0/,
     *     mcsdefc(cho,pccsdt,pdz,2) /1.8210d0/,
     *     mcsdefc(cho,pccsdt,pdz,3) /3.3330d0/,
     *     mcsdefc(cho,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(v3m,pccsdt,ptz,1) /1.1119d0/,
     *     mcsdefc(v3m,pccsdt,ptz,2) /0.9676d0/,
     *     mcsdefc(v3m,pccsdt,ptz,3) /0.8427d0/,
     *     mcsdefc(v3m,pccsdt,ptz,4) /0.0000d0/
     *     mcsdefc(v3s,pccsdt,pdz,1) /1.1062d0/,
     *     mcsdefc(v3s,pccsdt,pdz,2) /0.9321d0/,
     *     mcsdefc(v3s,pccsdt,pdz,3) /0.9026d0/,
     *     mcsdefc(v3s,pccsdt,pdz,4) /0.0000d0/,
     *     mcsdefc(cho,pccsdt,ptz,1) /1.0715d0/,
     *     mcsdefc(cho,pccsdt,ptz,2) /1.1969d0/,
     *     mcsdefc(cho,pccsdt,ptz,3) /1.8880d0/,
     *     mcsdefc(cho,pccsdt,ptz,4) /0.0000d0/


c
      data ibdefa  /3.39/
      data ibdefb(pmp2)  /1.91d0/,
     *     ibdefb(pmp4)  /2.08d0/,
     *     ibdefb(pccsd)  /1.94d0/,
     *     ibdefb(pccsdt)  /2.02d0/,
     *     ibdefb(nstd)  /2.00d0/
c
      data mcodefc(v1sc,pmp2,1) /0.9971d0/,
     *     mcodefc(v1sc,pmp2,2) /1.6560d0/,
     *     mcodefc(v1sc,pmp2,3) /0.7718d0/,
     *     mcodefc(v1sc,pmp2,4) /2.6398d0/,
     *     mcodefc(v1sc,pmp2,5) /0.0000d0/,
     *     mcodefc(v1sc,pmp2,6) /0.0000d0/,
     *     mcodefc(v1sc,pmp2,7) /0.0000d0/,
     *     mcodefc(v1sc,pmp2,8) /0.0000d0/,
     *     mcodefc(v1sc,pmp2,9) /0.0000d0/,
     *     mcodefc(v1sc,pmp2,10) /0.0000d0/
c
      data mcodefc(v1sc,pccsd,1) /0.9703d0/,
     *     mcodefc(v1sc,pccsd,2) /1.6636d0/,
     *     mcodefc(v1sc,pccsd,3) /1.1206d0/,
     *     mcodefc(v1sc,pccsd,4) /1.7329d0/,
     *     mcodefc(v1sc,pccsd,5) /0.7127d0/,
     *     mcodefc(v1sc,pccsd,6) /2.6136d0/,
     *     mcodefc(v1sc,pccsd,7) /0.0000d0/,
     *     mcodefc(v1sc,pccsd,8) /0.0000d0/,
     *     mcodefc(v1sc,pccsd,9) /0.0000d0/,
     *     mcodefc(v1sc,pccsd,10) /0.0000d0/
c
      data mcodefc(v1sc,pccsdt,1) /0.9887d0/,
     *     mcodefc(v1sc,pccsdt,2) /1.5377d0/,
     *     mcodefc(v1sc,pccsdt,3) /1.0048d0/,
     *     mcodefc(v1sc,pccsdt,4) /1.5208d0/,
     *     mcodefc(v1sc,pccsdt,5) /1.0106d0/,
     *     mcodefc(v1sc,pccsdt,6) /1.5695d0/,
     *     mcodefc(v1sc,pccsdt,7) /1.7202d0/,
     *     mcodefc(v1sc,pccsdt,8) /0.9124d0/,
     *     mcodefc(v1sc,pccsdt,9) /0.0000d0/,
     *     mcodefc(v1sc,pccsdt,10) /0.0000d0/
c
      data mcodefc(v2m,pmp2,1) /0.9918d0/,
     *     mcodefc(v2m,pmp2,2) /1.0276d0/,
     *     mcodefc(v2m,pmp2,3) /0.7833d0/,
     *     mcodefc(v2m,pmp2,4) /2.6875d0/,
     *     mcodefc(v2m,pmp2,5) /0.0000d0/,
     *     mcodefc(v2m,pmp2,6) /0.0000d0/,
     *     mcodefc(v2m,pmp2,7) /0.0000d0/,
     *     mcodefc(v2m,pmp2,8) /0.0000d0/,
     *     mcodefc(v2m,pmp2,9) /0.0000d0/,
     *     mcodefc(v2s,pmp2,10) /0.0000d0/
c
      data mcodefc(v2m,pmp4sdq,1) /0.9613d0/,
     *     mcodefc(v2m,pmp4sdq,2) /1.3628d0/,
     *     mcodefc(v2m,pmp4sdq,3) /1.0093d0/,
     *     mcodefc(v2m,pmp4sdq,4) /2.6287d0/,
     *     mcodefc(v2m,pmp4sdq,5) /0.5294d0/,
     *     mcodefc(v2m,pmp4sdq,6) /3.1443d0/,
     *     mcodefc(v2m,pmp4sdq,7) /0.0000d0/,
     *     mcodefc(v2m,pmp4sdq,8) /0.0000d0/,
     *     mcodefc(v2m,pmp4sdq,9) /0.0000d0/,
     *     mcodefc(v2m,pmp4sdq,10) /0.0000d0/
c
      data mcodefc(v2m,pmp4,1) /0.9895d0/,
     *     mcodefc(v2m,pmp4,2) /1.4888d0/,
     *     mcodefc(v2m,pmp4,3) /0.8535d0/,
     *     mcodefc(v2m,pmp4,4) /2.1953d0/,
     *     mcodefc(v2m,pmp4,5) /1.1825d0/,
     *     mcodefc(v2m,pmp4,6) /3.8465d0/,
     *     mcodefc(v2m,pmp4,7) /1.6905d0/,
     *     mcodefc(v2m,pmp4,8) /3.9165d0/,
     *     mcodefc(v2m,pmp4,9) /0.0000d0/,
     *     mcodefc(v2m,pmp4,10) /0.0000d0/
c
      data mcodefc(v2m,pccsd,1) /0.9618d0/,
     *     mcodefc(v2m,pccsd,2) /1.3810d0/,
     *     mcodefc(v2m,pccsd,3) /1.0475d0/,
     *     mcodefc(v2m,pccsd,4) /2.4491d0/,
     *     mcodefc(v2m,pccsd,5) /0.5782d0/,
     *     mcodefc(v2m,pccsd,6) /2.8382d0/,
     *     mcodefc(v2m,pccsd,7) /0.0000d0/,
     *     mcodefc(v2m,pccsd,8) /0.0000d0/,
     *     mcodefc(v2m,pccsd,9) /0.0000d0/,
     *     mcodefc(v2m,pccsd,10) /0.0000d0/
c
      data mcodefc(v2m,pccsdt,1) /0.9929d0/,
     *     mcodefc(v2m,pccsdt,2) /1.5121d0/,
     *     mcodefc(v2m,pccsdt,3) /0.9475d0/,
     *     mcodefc(v2m,pccsdt,4) /1.7902d0/,
     *     mcodefc(v2m,pccsdt,5) /0.9462d0/,
     *     mcodefc(v2m,pccsdt,6) /1.7687d0/,
     *     mcodefc(v2m,pccsdt,7) /1.9810d0/,
     *     mcodefc(v2m,pccsdt,8) /0.8222d0/,
     *     mcodefc(v2m,pccsdt,9) /0.0000d0/,
     *     mcodefc(v2m,pccsdt,10) /0.0000d0/
c
      data mcodefc(v2s,pmp2,1) /0.9887d0/,
     *     mcodefc(v2s,pmp2,2) /1.0828d0/,
     *     mcodefc(v2s,pmp2,3) /0.7768d0/,
     *     mcodefc(v2s,pmp2,4) /2.7893d0/,
     *     mcodefc(v2s,pmp2,5) /0.0000d0/,
     *     mcodefc(v2s,pmp2,6) /0.0000d0/,
     *     mcodefc(v2s,pmp2,7) /0.0000d0/,
     *     mcodefc(v2s,pmp2,8) /0.0000d0/,
     *     mcodefc(v2s,pmp2,9) /0.0000d0/,
     *     mcodefc(v2s,pmp2,10) /0.0000d0/
c
      data mcodefc(v2s,pmp4sdq,1) /0.9633d0/,
     *     mcodefc(v2s,pmp4sdq,2) /1.3834d0/,
     *     mcodefc(v2s,pmp4sdq,3) /0.9872d0/,
     *     mcodefc(v2s,pmp4sdq,4) /2.6535d0/,
     *     mcodefc(v2s,pmp4sdq,5) /0.5145d0/,
     *     mcodefc(v2s,pmp4sdq,6) /2.6409d0/,
     *     mcodefc(v2s,pmp4sdq,7) /0.0000d0/,
     *     mcodefc(v2s,pmp4sdq,8) /0.0000d0/,
     *     mcodefc(v2s,pmp4sdq,9) /0.0000d0/,
     *     mcodefc(v2s,pmp4sdq,10) /0.0000d0/
c
      data mcodefc(v2s,pmp4,1) /0.9964d0/,
     *     mcodefc(v2s,pmp4,2) /1.5157d0/,
     *     mcodefc(v2s,pmp4,3) /0.8123d0/,
     *     mcodefc(v2s,pmp4,4) /2.1066d0/,
     *     mcodefc(v2s,pmp4,5) /1.2808d0/,
     *     mcodefc(v2s,pmp4,6) /3.6512d0/,
     *     mcodefc(v2s,pmp4,7) /1.8043d0/,
     *     mcodefc(v2s,pmp4,8) /5.0707d0/,
     *     mcodefc(v2s,pmp4,9) /0.0000d0/,
     *     mcodefc(v2s,pmp4,10) /0.0000d0/
c
      data mcodefc(v2s,pccsd,1) /0.9635d0/,
     *     mcodefc(v2s,pccsd,2) /1.4008d0/,
     *     mcodefc(v2s,pccsd,3) /1.0217d0/,
     *     mcodefc(v2s,pccsd,4) /2.5017d0/,
     *     mcodefc(v2s,pccsd,5) /0.5515d0/,
     *     mcodefc(v2s,pccsd,6) /2.4227d0/,
     *     mcodefc(v2s,pccsd,7) /0.0000d0/,
     *     mcodefc(v2s,pccsd,8) /0.0000d0/,
     *     mcodefc(v2s,pccsd,9) /0.0000d0/,
     *     mcodefc(v2s,pccsd,10) /0.0000d0/
c
      data mcodefc(v2s,pccsdt,1) /0.9981d0/,
     *     mcodefc(v2s,pccsdt,2) /1.5432d0/,
     *     mcodefc(v2s,pccsdt,3) /0.9097d0/,
     *     mcodefc(v2s,pccsdt,4) /1.7613d0/,
     *     mcodefc(v2s,pccsdt,5) /0.9684d0/,
     *     mcodefc(v2s,pccsdt,6) /1.3340d0/,
     *     mcodefc(v2s,pccsdt,7) /2.1823d0/,
     *     mcodefc(v2s,pccsdt,8) /1.2716d0/,
     *     mcodefc(v2s,pccsdt,9) /0.0000d0/,
     *     mcodefc(v2s,pccsdt,10) /0.0000d0/
c
      data mcodefc(v2sc,pmp2,1) /0.9888d0/,
     *     mcodefc(v2sc,pmp2,2) /1.1177d0/,
     *     mcodefc(v2sc,pmp2,3) /0.7671d0/,
     *     mcodefc(v2sc,pmp2,4) /2.7028d0/,
     *     mcodefc(v2sc,pmp2,5) /0.0000d0/,
     *     mcodefc(v2sc,pmp2,6) /0.0000d0/,
     *     mcodefc(v2sc,pmp2,7) /0.0000d0/,
     *     mcodefc(v2sc,pmp2,8) /0.0000d0/,
     *     mcodefc(v2sc,pmp2,9) /0.0000d0/,
     *     mcodefc(v2sc,pmp2,10) /0.0000d0/
c
      data mcodefc(v2sc,pmp4sdq,1) /0.9615d0/,
     *     mcodefc(v2sc,pmp4sdq,2) /1.4505d0/,
     *     mcodefc(v2sc,pmp4sdq,3) /1.0035d0/,
     *     mcodefc(v2sc,pmp4sdq,4) /2.5157d0/,
     *     mcodefc(v2sc,pmp4sdq,5) /0.5870d0/,
     *     mcodefc(v2sc,pmp4sdq,6) /2.8439d0/,
     *     mcodefc(v2sc,pmp4sdq,7) /0.0000d0/,
     *     mcodefc(v2sc,pmp4sdq,8) /0.0000d0/,
     *     mcodefc(v2sc,pmp4sdq,9) /0.0000d0/,
     *     mcodefc(v2sc,pmp4sdq,10) /0.0000d0/
c
      data mcodefc(v2sc,pmp4,1) /0.9886d0/,
     *     mcodefc(v2sc,pmp4,2) /1.5656d0/,
     *     mcodefc(v2sc,pmp4,3) /0.8568d0/,
     *     mcodefc(v2sc,pmp4,4) /2.0846d0/,
     *     mcodefc(v2sc,pmp4,5) /1.2148d0/,
     *     mcodefc(v2sc,pmp4,6) /3.5897d0/,
     *     mcodefc(v2sc,pmp4,7) /1.5567d0/,
     *     mcodefc(v2sc,pmp4,8) /3.9450d0/,
     *     mcodefc(v2sc,pmp4,9) /0.0000d0/,
     *     mcodefc(v2sc,pmp4,10) /0.0000d0/
c
      data mcodefc(v2sc,pccsd,1) /0.9629d0/,
     *     mcodefc(v2sc,pccsd,2) /1.4633d0/,
     *     mcodefc(v2sc,pccsd,3) /1.0392d0/,
     *     mcodefc(v2sc,pccsd,4) /2.3290d0/,
     *     mcodefc(v2sc,pccsd,5) /0.6254d0/,
     *     mcodefc(v2sc,pccsd,6) /2.5222d0/,
     *     mcodefc(v2sc,pccsd,7) /0.0000d0/,
     *     mcodefc(v2sc,pccsd,8) /0.0000d0/,
     *     mcodefc(v2sc,pccsd,9) /0.0000d0/,
     *     mcodefc(v2sc,pccsd,10) /0.0000d0/
c
      data mcodefc(v2sc,pccsdt,1) /0.9914d0/,
     *     mcodefc(v2sc,pccsdt,2) /1.5839d0/,
     *     mcodefc(v2sc,pccsdt,3) /0.9477d0/,
     *     mcodefc(v2sc,pccsdt,4) /1.7238d0/,
     *     mcodefc(v2sc,pccsdt,5) /0.9633d0/,
     *     mcodefc(v2sc,pccsdt,6) /1.5365d0/,
     *     mcodefc(v2sc,pccsdt,7) /1.8210d0/,
     *     mcodefc(v2sc,pccsdt,8) /0.7451d0/,
     *     mcodefc(v2sc,pccsdt,9) /0.0000d0/,
     *     mcodefc(v2sc,pccsdt,10) /0.0000d0/
c
      data mutdefc(v1sc,pccsd,1) /0.9949d0/,
     *     mutdefc(v1sc,pccsd,2) /1.6872d0/,
     *     mutdefc(v1sc,pccsd,3) /1.1422d0/,
     *     mutdefc(v1sc,pccsd,4) /0.8323d0/
     *     mutdefc(v1sc,pccsd,5) /1.0040d0/,
     *     mutdefc(v1sc,pccsd,6) /0.0000d0/,
     *     mutdefc(v2sc,pccsd,7) /0.0000d0/

      data mcodefc(v3m,pmp2,1)  /1.0000d0/,
     *     mcodefc(v3m,pmp2,2)  /1.1361d0/,
     *     mcodefc(v3m,pmp2,3)  /0.7609d0/,
     *     mcodefc(v3m,pmp2,4)  /2.6099d0/,
     *     mcodefc(v3m,pmp2,5)  /0.0000d0/,
     *     mcodefc(v3m,pmp2,6)  /0.0000d0/,
     *     mcodefc(v3m,pmp2,7)  /0.0000d0/,
     *     mcodefc(v3m,pmp2,8)  /0.0000d0/,
     *     mcodefc(v3m,pmp2,9)  /0.0000d0/,
     *     mcodefc(v3m,pmp2,10) /0.0000d0/

      data mcodefc(v3s,pmp2,1)  /1.0000d0/,
     *     mcodefc(v3s,pmp2,2)  /1.1722d0/,
     *     mcodefc(v3s,pmp2,3)  /0.7648d0/,
     *     mcodefc(v3s,pmp2,4)  /2.5938d0/,
     *     mcodefc(v3s,pmp2,5)  /0.0000d0/,
     *     mcodefc(v3s,pmp2,6)  /0.0000d0/,
     *     mcodefc(v3s,pmp2,7)  /0.0000d0/,
     *     mcodefc(v3s,pmp2,8)  /0.0000d0/,
     *     mcodefc(v3s,pmp2,9)  /0.0000d0/,
     *     mcodefc(v3s,pmp2,10) /0.0000d0/

      data mcodefc(cho,pmp2,1)  /1.0349d0/,
     *     mcodefc(cho,pmp2,2)  /2.0168d0/,
     *     mcodefc(cho,pmp2,3)  /0.7502d0/,
     *     mcodefc(cho,pmp2,4)  /1.6960d0/,
     *     mcodefc(cho,pmp2,5)  /0.0000d0/,
     *     mcodefc(cho,pmp2,6)  /0.0000d0/,
     *     mcodefc(cho,pmp2,7)  /0.0000d0/,
     *     mcodefc(cho,pmp2,8)  /0.0000d0/,
     *     mcodefc(cho,pmp2,9)  /0.0000d0/,
     *     mcodefc(cho,pmp2,10) /0.0000d0/
c
      data mcodefc(v3m,pmp4sdq,1)  /1.0000d0/,
     *     mcodefc(v3m,pmp4sdq,2)  /1.4282d0/,
     *     mcodefc(v3m,pmp4sdq,3)  /0.9551d0/,
     *     mcodefc(v3m,pmp4sdq,4)  /1.9690d0/,
     *     mcodefc(v3m,pmp4sdq,5)  /0.6646d0/,
     *     mcodefc(v3m,pmp4sdq,6)  /1.1617d0/,
     *     mcodefc(v3m,pmp4sdq,7)  /0.0000d0/,
     *     mcodefc(v3m,pmp4sdq,8)  /0.0000d0/,
     *     mcodefc(v3m,pmp4sdq,9)  /0.0000d0/,
     *     mcodefc(v3m,pmp4sdq,10) /0.0000d0/

      data mcodefc(v3s,pmp4sdq,1)  /1.0000d0/,
     *     mcodefc(v3s,pmp4sdq,2)  /1.4285d0/,
     *     mcodefc(v3s,pmp4sdq,3)  /0.9382d0/,
     *     mcodefc(v3s,pmp4sdq,4)  /2.0131d0/,
     *     mcodefc(v3s,pmp4sdq,5)  /0.6384d0/,
     *     mcodefc(v3s,pmp4sdq,6)  /0.7710d0/,
     *     mcodefc(v3s,pmp4sdq,7)  /0.0000d0/,
     *     mcodefc(v3s,pmp4sdq,8)  /0.0000d0/,
     *     mcodefc(v3s,pmp4sdq,9)  /0.0000d0/,
     *     mcodefc(v3s,pmp4sdq,10) /0.0000d0/

      data mcodefc(cho,pmp4sdq,1)  /1.0000d0/,
     *     mcodefc(cho,pmp4sdq,2)  /1.8089d0/,
     *     mcodefc(cho,pmp4sdq,3)  /1.0015d0/,
     *     mcodefc(cho,pmp4sdq,4)  /1.5018d0/,
     *     mcodefc(cho,pmp4sdq,5)  /0.5966d0/,
     *     mcodefc(cho,pmp4sdq,6)  /1.3778d0/,
     *     mcodefc(cho,pmp4sdq,7)  /0.0000d0/,
     *     mcodefc(cho,pmp4sdq,8)  /0.0000d0/,
     *     mcodefc(cho,pmp4sdq,9)  /0.0000d0/,
     *     mcodefc(cho,pmp4sdq,10) /0.0000d0/
c
      data mcodefc(v3m,pmp4,1)  /1.0000d0/,
     *     mcodefc(v3m,pmp4,2)  /1.5666d0/,
     *     mcodefc(v3m,pmp4,3)  /0.8071d0/,
     *     mcodefc(v3m,pmp4,4)  /2.1216d0/,
     *     mcodefc(v3m,pmp4,5)  /1.3189d0/,
     *     mcodefc(v3m,pmp4,6)  /1.9612d0/,
     *     mcodefc(v3m,pmp4,7)  /2.3753d0/,
     *     mcodefc(v3m,pmp4,8)  /2.1027d0/,
     *     mcodefc(v3m,pmp4,9)  /0.0000d0/,
     *     mcodefc(v3m,pmp4,10) /0.0000d0/
c
      data mcodefc(v3s,pmp4,1)  /1.0000d0/,
     *     mcodefc(v3s,pmp4,2)  /1.5624d0/,
     *     mcodefc(v3s,pmp4,3)  /0.7855d0/,
     *     mcodefc(v3s,pmp4,4)  /2.1292d0/,
     *     mcodefc(v3s,pmp4,5)  /1.3351d0/,
     *     mcodefc(v3s,pmp4,6)  /1.6939d0/,
     *     mcodefc(v3s,pmp4,7)  /2.3521d0/,
     *     mcodefc(v3s,pmp4,8)  /2.7357d0/,
     *     mcodefc(v3s,pmp4,9)  /0.0000d0/,
     *     mcodefc(v3s,pmp4,10) /0.0000d0/
c
      data mcodefc(cho,pmp4,1)  /1.0000d0/,
     *     mcodefc(cho,pmp4,2)  /1.6997d0/,
     *     mcodefc(cho,pmp4,3)  /0.9601d0/,
     *     mcodefc(cho,pmp4,4)  /1.5852d0/,
     *     mcodefc(cho,pmp4,5)  /0.8631d0/,
     *     mcodefc(cho,pmp4,6)  /1.4685d0/,
     *     mcodefc(cho,pmp4,7)  /0.7742d0/,
     *     mcodefc(cho,pmp4,8)  /0.7237d0/,
     *     mcodefc(cho,pmp4,9)  /0.0000d0/,
     *     mcodefc(cho,pmp4,10) /0.0000d0/
c
      data mcodefc(v3m,pccsd,1) /1.0000d0/,
     *     mcodefc(v3m,pccsd,2) /1.4306d0/,
     *     mcodefc(v3m,pccsd,3) /0.9709d0/,
     *     mcodefc(v3m,pccsd,4) /1.9298d0/,
     *     mcodefc(v3m,pccsd,5) /0.7020d0/,
     *     mcodefc(v3m,pccsd,6) /0.8383d0/,
     *     mcodefc(v3m,pccsd,7) /0.0000d0/,
     *     mcodefc(v3m,pccsd,8) /0.0000d0/,
     *     mcodefc(v3m,pccsd,9) /0.0000d0/,
     *     mcodefc(v3m,pccsd,10) /0.0000d0/

      data mcodefc(v3s,pccsd,1)  /1.0000d0/,
     *     mcodefc(v3s,pccsd,2)  /1.4321d0/,
     *     mcodefc(v3s,pccsd,3)  /0.9555d0/,
     *     mcodefc(v3s,pccsd,4)  /1.9709d0/,
     *     mcodefc(v3s,pccsd,5)  /0.6752d0/,
     *     mcodefc(v3s,pccsd,6)  /0.5276d0/,
     *     mcodefc(v3s,pccsd,7)  /0.0000d0/,
     *     mcodefc(v3s,pccsd,8)  /0.0000d0/,
     *     mcodefc(v3s,pccsd,9)  /0.0000d0/,
     *     mcodefc(v3s,pccsd,10) /0.0000d0/

      data mcodefc(cho,pccsd,1)  /1.0000d0/,
     *     mcodefc(cho,pccsd,2)  /1.6159d0/,
     *     mcodefc(cho,pccsd,3)  /1.0392d0/,
     *     mcodefc(cho,pccsd,4)  /1.4306d0/,
     *     mcodefc(cho,pccsd,5)  /0.6187d0/,
     *     mcodefc(cho,pccsd,6)  /1.2756d0/,
     *     mcodefc(cho,pccsd,7)  /0.0000d0/,
     *     mcodefc(cho,pccsd,8)  /0.0000d0/,
     *     mcodefc(cho,pccsd,9)  /0.0000d0/,
     *     mcodefc(cho,pccsd,10) /0.0000d0/
c
      data mcodefc(v3m,pccsdt,1)  /1.0000d0/,
     *     mcodefc(v3m,pccsdt,2)  /1.5652d0/,
     *     mcodefc(v3m,pccsdt,3)  /0.8370d0/,
     *     mcodefc(v3m,pccsdt,4)  /2.0959d0/,
     *     mcodefc(v3m,pccsdt,5)  /0.9349d0/,
     *     mcodefc(v3m,pccsdt,6)  /1.3857d0/,
     *     mcodefc(v3m,pccsdt,7)  /2.2431d0/,
     *     mcodefc(v3m,pccsdt,8)  /1.1679d0/,
     *     mcodefc(v3m,pccsdt,9)  /0.0000d0/,
     *     mcodefc(v3m,pccsdt,10) /0.0000d0/

c
      data mcodefc(v3s,pccsdt,1)  /1.0000d0/,
     *     mcodefc(v3s,pccsdt,2)  /1.5613d0/,
     *     mcodefc(v3s,pccsdt,3)  /0.8168d0/,
     *     mcodefc(v3s,pccsdt,4)  /2.1349d0/,
     *     mcodefc(v3s,pccsdt,5)  /0.9169d0/,
     *     mcodefc(v3s,pccsdt,6)  /1.0760d0/,
     *     mcodefc(v3s,pccsdt,7)  /2.2619d0/,
     *     mcodefc(v3s,pccsdt,8)  /1.4593d0/,
     *     mcodefc(v3s,pccsdt,9)  /0.0000d0/,
     *     mcodefc(v3s,pccsdt,10) /0.0000d0/

c
      data mcodefc(cho,pccsdt,1)  /1.0000d0/,
     *     mcodefc(cho,pccsdt,2)  /1.5895d0/,
     *     mcodefc(cho,pccsdt,3)  /1.0026d0/,
     *     mcodefc(cho,pccsdt,4)  /1.3615d0/,
     *     mcodefc(cho,pccsdt,5)  /0.9520d0/,
     *     mcodefc(cho,pccsdt,6)  /1.4874d0/,
     *     mcodefc(cho,pccsdt,7)  /1.5912d0/,
     *     mcodefc(cho,pccsdt,8)  /0.8156d0/,
     *     mcodefc(cho,pccsdt,9)  /0.0000d0/,
     *     mcodefc(cho,pccsdt,10) /0.0000d0/

c
      data mutdefc(v1sc,pccsdt,1) /1.0002d0/,
     *     mutdefc(v1sc,pccsdt,2) /1.4852d0/,
     *     mutdefc(v1sc,pccsdt,3) /1.0026d0/,
     *     mutdefc(v1sc,pccsdt,4) /1.1447d0/,
     *     mutdefc(v1sc,pccsdt,5) /1.1869d0/,
     *     mutdefc(v1sc,pccsdt,6) /2.1343d0/,
     *     mutdefc(v1sc,pccsdt,7) /0.0000d0/

      data mutdefc(v3m,pccsdt,1)  /1.0000d0/,
     *     mutdefc(v3m,pccsdt,2)  /1.5118d0/,
     *     mutdefc(v3m,pccsdt,3)  /0.8062d0/,
     *     mutdefc(v3m,pccsdt,4)  /2.2306d0/,
     *     mutdefc(v3m,pccsdt,5)  /0.9670d0/,
     *     mutdefc(v3m,pccsdt,6)  /2.2989d0/,
     *     mutdefc(v3m,pccsdt,7)  /0.0000d0/

      data mutdefc(v3s,pccsdt,1)  /1.0000d0/,
     *     mutdefc(v3s,pccsdt,2)  /1.5360d0/,
     *     mutdefc(v3s,pccsdt,3)  /0.7939d0/,
     *     mutdefc(v3s,pccsdt,4)  /2.2653d0/,
     *     mutdefc(v3s,pccsdt,5)  /0.9254d0/,
     *     mutdefc(v3s,pccsdt,6)  /2.3616d0/,
     *     mutdefc(v3s,pccsdt,7)  /0.0000d0/

      data mutdefc(cho,pccsdt,1)  /1.0000d0/,
     *     mutdefc(cho,pccsdt,2)  /1.3069d0/,
     *     mutdefc(cho,pccsdt,3)  /0.9276d0/,
     *     mutdefc(cho,pccsdt,4)  /1.6755d0/,
     *     mutdefc(cho,pccsdt,5)  /0.9415d0/,
     *     mutdefc(cho,pccsdt,6)  /1.9394d0/,
     *     mutdefc(cho,pccsdt,7)  /0.0000d0/
c
      data mutdefc(v2m,pmp4sdq,1) /0.9934d0/,
     *     mutdefc(v2m,pmp4sdq,2) /1.2606d0/,
     *     mutdefc(v2m,pmp4sdq,3) /1.0363d0/,
     *     mutdefc(v2m,pmp4sdq,4) /1.6307d0/,
     *     mutdefc(v2m,pmp4sdq,5) /0.8541d0/,
     *     mutdefc(v2m,pmp4sdq,6) /0.0000d0/,
     *     mutdefc(v2m,pmp4sdq,7) /0.0000d0/
c
      data mutdefc(v2m,pmp4,1) /1.0040d0/,
     *     mutdefc(v2m,pmp4,2) /2.5726d0/,
     *     mutdefc(v2m,pmp4,3) /0.9136d0/,
     *     mutdefc(v2m,pmp4,4) /2.8707d0/,
     *     mutdefc(v2m,pmp4,5) /1.1605d0/,
     *     mutdefc(v2m,pmp4,6) /1.7108d0/,
     *     mutdefc(v2m,pmp4,7) /0.0000d0/
c
      data mutdefc(v2m,pccsd,1) /0.9969d0/,
     *     mutdefc(v2m,pccsd,2) /1.2625d0/,
     *     mutdefc(v2m,pccsd,3) /1.0610d0/,
     *     mutdefc(v2m,pccsd,4) /1.4813d0/,
     *     mutdefc(v2m,pccsd,5) /0.8312d0/,
     *     mutdefc(v2m,pccsd,6) /0.0000d0/,
     *     mutdefc(v2m,pccsd,7) /0.0000d0/

      data mutdefc(v3m,pccsd,1) /1.0000d0/,
     *     mutdefc(v3m,pccsd,2) /1.3800d0/,
     *     mutdefc(v3m,pccsd,3) /0.9505d0/,
     *     mutdefc(v3m,pccsd,4) /1.9749d0/,
     *     mutdefc(v3m,pccsd,5) /0.7531d0/,
     *     mutdefc(v3m,pccsd,6) /0.0000d0/,
     *     mutdefc(v3m,pccsd,7) /0.0000d0/

      data mutdefc(v3s,pccsd,1) /1.0000d0/,
     *     mutdefc(v3s,pccsd,2) /1.4008d0/,
     *     mutdefc(v3s,pccsd,3) /0.9425d0/,
     *     mutdefc(v3s,pccsd,4) /1.9995d0/,
     *     mutdefc(v3s,pccsd,5) /0.7073d0/,
     *     mutdefc(v3s,pccsd,6) /0.0000d0/,
     *     mutdefc(v3s,pccsd,7) /0.0000d0/

      data mutdefc(cho,pccsd,1) /1.0325d0/,
     *     mutdefc(cho,pccsd,2) /1.8885d0/,
     *     mutdefc(cho,pccsd,3) /0.7867d0/,
     *     mutdefc(cho,pccsd,4) /1.6133d0/,
     *     mutdefc(cho,pccsd,5) /0.0687d0/,
     *     mutdefc(cho,pccsd,6) /0.0000d0/,
     *     mutdefc(cho,pccsd,7) /0.0000d0/
c
      data mutdefc(v2m,pccsdt,1) /1.0143d0/,
     *     mutdefc(v2m,pccsdt,2) /1.4894d0/,
     *     mutdefc(v2m,pccsdt,3) /0.9402d0/,
     *     mutdefc(v2m,pccsdt,4) /1.2493d0/,
     *     mutdefc(v2m,pccsdt,5) /1.1061d0/,
     *     mutdefc(v2m,pccsdt,6) /2.3805d0/,
     *     mutdefc(v2m,pccsdt,7) /0.0000d0/
c
      data mutdefc(v2s,pmp4sdq,1) /0.9903d0/,
     *     mutdefc(v2s,pmp4sdq,2) /1.2975d0/,
     *     mutdefc(v2s,pmp4sdq,3) /1.0099d0/,
     *     mutdefc(v2s,pmp4sdq,4) /1.8153d0/,
     *     mutdefc(v2s,pmp4sdq,5) /0.7872d0/,
     *     mutdefc(v2s,pmp4sdq,6) /0.0000d0/,
     *     mutdefc(v2s,pmp4sdq,7) /0.0000d0/
c
      data mutdefc(v2s,pmp4,1) /1.0009d0/,
     *     mutdefc(v2s,pmp4,2) /2.5466d0/,
     *     mutdefc(v2s,pmp4,3) /0.8862d0/,
     *     mutdefc(v2s,pmp4,4) /2.9916d0/,
     *     mutdefc(v2s,pmp4,5) /1.0962d0/,
     *     mutdefc(v2s,pmp4,6) /1.7254d0/,
     *     mutdefc(v2s,pmp4,7) /0.0000d0/
c
      data mutdefc(v3m,pmp4,1) /1.0000d0/,
     *     mutdefc(v3m,pmp4,2) /1.5394d0/,
     *     mutdefc(v3m,pmp4,3) /0.7735d0/,
     *     mutdefc(v3m,pmp4,4) /2.3270d0/,
     *     mutdefc(v3m,pmp4,5) /1.2431d0/,
     *     mutdefc(v3m,pmp4,6) /2.5328d0/,
     *     mutdefc(v3m,pmp4,7) /0.0000d0/

      data mutdefc(v3s,pmp4,1) /1.0000d0/,
     *     mutdefc(v3s,pmp4,2) /1.5544d0/,
     *     mutdefc(v3s,pmp4,3) /0.7645d0/,
     *     mutdefc(v3s,pmp4,4) /2.3611d0/,
     *     mutdefc(v3s,pmp4,5) /1.1834d0/,
     *     mutdefc(v3s,pmp4,6) /2.5178d0/,
     *     mutdefc(v3s,pmp4,7) /0.0000d0/

      data mutdefc(cho,pmp4,1) /1.0000d0/,
     *     mutdefc(cho,pmp4,2) /1.6043d0/,
     *     mutdefc(cho,pmp4,3) /0.9108d0/,
     *     mutdefc(cho,pmp4,4) /1.7591d0/,
     *     mutdefc(cho,pmp4,5) /0.8669d0/,
     *     mutdefc(cho,pmp4,6) /1.0151d0/,
     *     mutdefc(cho,pmp4,7) /0.0000d0/
c
      data mutdefc(v2s,pccsd,1) /0.9935d0/,
     *     mutdefc(v2s,pccsd,2) /1.2997d0/,
     *     mutdefc(v2s,pccsd,3) /1.0332d0/,
     *     mutdefc(v2s,pccsd,4) /1.6755d0/,
     *     mutdefc(v2s,pccsd,5) /0.7675d0/,
     *     mutdefc(v2s,pccsd,6) /0.0000d0/,
     *     mutdefc(v2s,pccsd,7) /0.0000d0/
c
      data mutdefc(v2s,pccsdt,1) /1.0112d0/,
     *     mutdefc(v2s,pccsdt,2) /1.5307d0/,
     *     mutdefc(v2s,pccsdt,3) /0.9101d0/,
     *     mutdefc(v2s,pccsdt,4) /1.4394d0/,
     *     mutdefc(v2s,pccsdt,5) /1.0473d0/,
     *     mutdefc(v2s,pccsdt,6) /2.4238d0/,
     *     mutdefc(v2s,pccsdt,7) /0.0000d0/
c
      data mutdefc(v2sc,pmp4sdq,1) /0.9905d0/,
     *     mutdefc(v2sc,pmp4sdq,2) /1.3579d0/,
     *     mutdefc(v2sc,pmp4sdq,3) /1.0280d0/,
     *     mutdefc(v2sc,pmp4sdq,4) /1.6130d0/,
     *     mutdefc(v2sc,pmp4sdq,5) /0.8807d0/,
     *     mutdefc(v2sc,pmp4sdq,6) /0.0000d0/,
     *     mutdefc(v2sc,pmp4sdq,7) /0.0000d0/
c
      data mutdefc(v3m,pmp4sdq,1)  /1.0000d0/,
     *     mutdefc(v3m,pmp4sdq,2)  /1.3772d0/,
     *     mutdefc(v3m,pmp4sdq,3)  /0.9318d0/,
     *     mutdefc(v3m,pmp4sdq,4)  /2.0071d0/,
     *     mutdefc(v3m,pmp4sdq,5)  /0.7505d0/,
     *     mutdefc(v3m,pmp4sdq,6)  /0.0000d0/,
     *     mutdefc(v3m,pmp4sdq,7)  /0.0000d0/

      data mutdefc(v3s,pmp4sdq,1)  /1.0000d0/,
     *     mutdefc(v3s,pmp4sdq,2)  /1.3949d0/,
     *     mutdefc(v3s,pmp4sdq,3)  /0.9231d0/,
     *     mutdefc(v3s,pmp4sdq,4)  /2.0361d0/,
     *     mutdefc(v3s,pmp4sdq,5)  /0.6956d0/,
     *     mutdefc(v3s,pmp4sdq,6)  /0.0000d0/,
     *     mutdefc(v3s,pmp4sdq,7)  /0.0000d0/

      data mutdefc(cho,pmp4sdq,1)  /1.0273d0/,
     *     mutdefc(cho,pmp4sdq,2)  /1.6167d0/,
     *     mutdefc(cho,pmp4sdq,3)  /0.9268d0/,
     *     mutdefc(cho,pmp4sdq,4)  /1.1904d0/,
     *     mutdefc(cho,pmp4sdq,5)  /0.4652d0/,
     *     mutdefc(cho,pmp4sdq,6)  /0.0000d0/,
     *     mutdefc(cho,pmp4sdq,7)  /0.0000d0/
c
      data mutdefc(v2sc,pmp4,1) /1.0002d0/,
     *     mutdefc(v2sc,pmp4,2) /2.6548d0/,
     *     mutdefc(v2sc,pmp4,3) /0.9165d0/,
     *     mutdefc(v2sc,pmp4,4) /2.8444d0/,
     *     mutdefc(v2sc,pmp4,5) /1.1591d0/,
     *     mutdefc(v2sc,pmp4,6) /1.5546d0/,
     *     mutdefc(v2sc,pmp4,7) /0.0000d0/
c
      data mutdefc(v2sc,pccsd,1) /0.9941d0/,
     *     mutdefc(v2sc,pccsd,2) /1.3580d0/,
     *     mutdefc(v2sc,pccsd,3) /1.0512d0/,
     *     mutdefc(v2sc,pccsd,4) /1.4689d0/
     *     mutdefc(v2sc,pccsd,5) /0.8502d0/,
     *     mutdefc(v2sc,pccsd,6) /0.0000d0/,
     *     mutdefc(v2sc,pccsd,7) /0.0000d0/

c
      data mutdefc(v2sc,pccsdt,1) /1.0099d0/,
     *     mutdefc(v2sc,pccsdt,2) /1.5644d0/,
     *     mutdefc(v2sc,pccsdt,3) /0.9413d0/,
     *     mutdefc(v2sc,pccsdt,4) /1.2580d0/,
     *     mutdefc(v2sc,pccsdt,5) /1.1002d0/,
     *     mutdefc(v2sc,pccsdt,6) /2.1652d0/,
     *     mutdefc(v2sc,pccsdt,7) /0.0000d0/
c
      data mnmdefc(v1sc,1) /1.0013d0/,
     *     mnmdefc(v1sc,2) /1.4127d0/,
     *     mnmdefc(v1sc,3) /0.0173d0/,
     *     mnmdefc(v1sc,4) /1.0516d0/,
     *     mnmdefc(v1sc,5) /1.2159d0/,
     *     mnmdefc(v1sc,6) /2.1967d0/,
     *     mnmdefc(v1sc,7) /0.3790d0/
c
      data mnmdefc(v2m,1) /1.0164d0/,
     *     mnmdefc(v2m,2) /1.4933d0/,
     *     mnmdefc(v2m,3) /0.9482d0/,
     *     mnmdefc(v2m,4) /1.1781d0/,
     *     mnmdefc(v2m,5) /1.0779d0/,
     *     mnmdefc(v2m,6) /2.2702d0/,
     *     mnmdefc(v2m,7) /0.3115d0/
c
      data mnmdefc(v2s,1) /1.0126d0/,
     *     mnmdefc(v2s,2) /1.5334d0/,
     *     mnmdefc(v2s,3) /0.9156d0/,
     *     mnmdefc(v2s,4) /1.3905d0/,
     *     mnmdefc(v2s,5) /1.0280d0/,
     *     mnmdefc(v2s,6) /2.3481d0/,
     *     mnmdefc(v2s,7) /0.2140d0/
c
      data mnmdefc(v2sc,1) /1.0114d0/,
     *     mnmdefc(v2sc,2) /1.5672d0/,
     *     mnmdefc(v2sc,3) /0.9471d0/,
     *     mnmdefc(v2sc,4) /1.2062d0/,
     *     mnmdefc(v2sc,5) /1.0789d0/,
     *     mnmdefc(v2sc,6) /2.0852d0/,
     *     mnmdefc(v2sc,7) /0.2262d0/
c
c  f___ indicates a formatted list for printing output

      character*20 esmlist(-1:6), fesmlist(-1:6)
      character*20 baslist(-1:4), fbaslist(-1:4)
      character*20 mcmlist(6), verslist(0:8)

      data esmlist /'Non-Std. ','n/a ','ccsd(t) ','mp4 ','ccsd ',
     *                 'mp4sdq ','mp2 ','hf '/
      data fesmlist /'Non-Standard','N/A','CCSD(T)','MP4','CCSD',
     *                 'MP4SDQ','MP2','HF'/
      data baslist /'Non-Std. ','n/a ','cc-pvtz ','cc-pvdz ',
c     *                 'pdz+ ','6-31+g(d,2p) '/
     *                 'mpdz ','6-31+g(d,2p) '/                         0808RMP12
      data fbaslist /'Non-Standard','N/A','cc-pVTZ','cc-pVDZ',
c     *                 'pDZ+','6-31+g(d,2p)'/
     *                 'mpDZ','6-31+g(d,2p)'/                           0808RMP12
      data verslist /'-','v1s','v1sc','v2m','v2s','v2sc','cho',
     *               'v3m','v3s'/
      data mcmlist /'MCCM-CO','MCCM-NM','MCCM-UT','IB','MCSAC','SAC'/

      end module param
c
c
c******************************************************************************
c     MODULE:ENERGY
c******************************************************************************
c
      module energy
c 
c     Created:  Summer 1999 by J. M. Rodgers 
c     Revised:  January 6, 2000 by P. L. Fast
c     Purpose:  To create common block for all the energies calculated by
c        Multilevel and gathered from the electronic structure program.
c
      implicit none

      integer, parameter, private :: numes    = 6
      integer, parameter, private :: numbas   = 3
      integer, parameter, private :: numcalc  = 44
c  counts the es calculations tabulated in gparam and the hlc energy
      integer, parameter, private :: numg2est = 10
      integer, parameter, private :: nummg2es = 10
c  counts the es calculations tabulated in gparam and so and hlc energies
      integer, parameter, private :: numg3est =  9
      integer, parameter, private :: nummg3es =  9
c  counts the es calculations tabulated in gparam energies
      integer, parameter, private :: nummqces = 4                       0106PF00
c  counts the es calculations tabulated in gparam energies              0627PJ00
      integer, parameter, private :: nummcomp2es =4                     0627PJ00
      integer, parameter, private :: nummccoes =4                       0711BL02
      integer, parameter, private :: numg3sxmp3es =10                   1011YZ03
      integer, parameter, private :: nummc3bbes = 3                     1011YZ03
      integer, parameter, private :: nummc3mpwes = 3                    1011YZ03


c
c  hfmoener(1) = hf energy
c  hfmoener(2) = mo energy
c  hfmoener(3) = hf||mo energy
c
      double precision eso, ecc, erel
      double precision hfmoener(3)
      double precision esener(numes, numbas)
      double precision mcener(numcalc)
      double precision g2ener, mg2ener
      double precision g2es(numg2est), mg2es(nummg2es)
      double precision g3ener, mg3ener
      double precision g3es(10), mg3es(nummg3es)                        0224BL02
      double precision mqces(nummqces+1), mqcener                       0224BL02
      double precision mcomp2es(nummcomp2es), mcomp2ener                0627PJ00
      double precision mccoes(nummccoes), mccoener                      0712BL02
      double precision imohcener, imohces(3)
      double precision g3sxmp3ener, g3sxmp3es(numg3sxmp3es)             1011YZ03
      double precision mc3bbener, mc3bbes(nummc3bbes)                   1011YZ03
      double precision mc3mpwener, mc3mpwes(nummc3mpwes)                1011YZ03

      COMMON /ENER/ esener, mcener, hfmoener, g2ener, mg2ener,
     * g3ener, mg3ener, mg2es, g3es, mg3es, g3sxmp3ener,
     * mqces, mqcener, imohcener, imohces, eso, ecc, erel,              0106PF00
     * mcomp2es, mcomp2ener, mccoes, mccoener, g3sxmp3es,               0712BL02
     * mc3bbes, mc3bbener,mc3mpwes, mc3mpwener                          1011YZ03 
      end module energy
c
c
c******************************************************************************
c     MODULE:ATMINFO
c******************************************************************************
c
      module atminfo
c 
c     Created:  Summer 1999 by J. M. Rodgers 
c     Revised: 
c     Purpose:  To define all the atomic masses and names to be used in
c        reading the geometry in from the infile and interpreting it.
c
c     Called by:  rgeom
c
      implicit none

      integer, private :: a
      double precision ams(103)
      character*2 asymb(103)
c
c array of atomic masses
c
      data (ams(a),a=1,54)  /
     *   1.007825d+00,4.0026d+00,7.01600d+00,9.01218d+00,11.00931d+00,
     *   12.0d+00,14.00307d+00,15.99491d+00,18.99840d+00,19.99244d+00,
     *   22.9898d+00,23.98504d+00,26.98153d+00,27.97693d+00,
     *   30.97376d+00,31.97207d+00,34.96885d+00,39.948d+00, 
     *   38.96371d+00,39.96259d+00,44.95592d+00,47.90d+00,50.9440d+00,
     *   51.9405d+00,54.9381d+00,55.9349d+00,58.9332d+00,57.9353d+00, 
     *   62.9298d+00,63.9291d+00,68.9257d+00,73.9219d+00,74.9216d+00, 
     *   79.9165d+00,78.9183d+00,83.9115d+00,
     *   84.9117d+00,87.9056d+00,89.9054d+00,89.9043d+00,92.9060d+00,
     *   97.9055d+00,97.0d+00,101.9037d+00,102.9048d+00,105.9032d+00,
     *   106.9041d+00,113.9036d+00,114.9041d+00,119.9022d+00,
     *   120.9038d+00,129.9067d+00,126.9044d+00,131.9042d+00/
      data (ams(a),a=55,103)  /
     *   132.9054d+00,137.9052d+00,138.9063d+00,139.9054d+00,
     *   140.9076d+00,141.9077d+00,144.9127d+00,151.9197d+00,
     *   152.9212d+00,157.9241d+00,158.9253d+00,163.9292d+00,
     *   164.9303d+00,165.9303d+00,168.9342d+00,173.9389d+00,
     *   174.9408d+00,179.9465d+00,180.9480d+00,183.9509d+00,
     *   186.9557d+00,191.9615d+00,192.9629d+00,194.9648d+00,
     *   196.9665d+00,201.9706d+00,
     *   204.9744d+00,207.9766d+00,208.9804d+00,208.9824d+00,
     *   209.9871d+00,222.0176d+00,
     *   223.0197d+00,226.0254d+00,
     *   227.0278d+00,232.0381d+00,231.0359d+00,238.0508d+00,
     *   237.0482d+00,244.0642d+00,243.0614d+00,247.0703d+00,
     *   247.0703d+00,251.0796d+00,252.0829d+00,257.0751d+00,
     *   258.0986d+00,259.1009d+00,260.1053d+00/
c
c array of atomic symbols
c
      data (asymb(a),a=1,103)  /
     *   'h ','he','li','be','b ','c ','n ','o ','f ','ne',
     *   'na','mg','al','si','p ','s ','cl','ar',
     *   'k ','ca','sc','ti','v ','cr','mn','fe','co','ni','cu',
     *        'zn','ga','ge','as','se','br','kr',
     *   'rb','sr','y ','zr','nb','mo','tc','ru','rh','pd','ag',
     *        'cd','in','sn','sb','te','i ','xe',
     *   'cs','ba','la','ce','pr','nd','pm','sm','eu','gd','tb',
     *        'dy','ho','er','tm','yb','lu','hf','ta','w ','re',
     *        'os','ir','pt','au','hg','tl','pb','bi','po','at','rn', 
     *   'fr','ra','ac','th','pa','u','np','pu','am','cm','bk',
     *        'cf','es','fm','md','no','lr'/

      end module atminfo
c
c
c******************************************************************************
c     MODULE:GRADIENT
c******************************************************************************
c  
      module gradient
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:  January 6, 2000 by P. L. Fast
c     Purpose:  To create common block for all the gradients calculated by
c        Multilevel and gathered from the electronic structure program.
c
      implicit none

      integer, parameter, private :: numes    = 6
      integer, parameter, private :: numbas   = 3
      integer, parameter, private :: numcalc  = 44
      integer, parameter, private :: numg2est = 10
      integer, parameter, private :: numg3est = 9
      integer, parameter, private :: nummg2es = 10
      integer, parameter, private :: nummg3es = 9
      integer, parameter, private :: numg3sxmp3es =10                   1011YZ03
      integer, parameter, private :: nummc3bbes = 3                     1011YZ03
      integer, parameter, private :: nummc3mpwes = 3                    1011YZ03
      integer, parameter, private :: nummqces = 4                       0106PF00
      integer, parameter, private :: nummcomp2es = 4                    0627PJ00
      integer, parameter, private :: nummccoes = 4                      0713BL02
      integer, parameter, private :: maxatm = 50
      integer, parameter, private :: maxgrad  = 3*maxatm
c
c  hfmograd(1) = hf grad
c  hfmograd(2) = mo grad
c  hfmograd(3) = hf||mo grad
c
      double precision hfmograd(3,maxgrad)
      double precision esgrad(numes, numbas,maxgrad)
      double precision mcgrad(numcalc,maxgrad)
      double precision g2grad(maxgrad), g2esgr(numg2est,maxgrad)
      double precision mg2grad(maxgrad)
      double precision mg2esgr(nummg2es,maxgrad)
      double precision g3grad(maxgrad), g3esgr(10,maxgrad)              0224BL02
      double precision g3sxmp3grad(maxgrad), g3sxmp3esgr(10,maxgrad)    1011YZ03
      double precision mc3bbgrad(maxgrad), mc3bbesgr(10,maxgrad)        1011YZ03
      double precision mc3mpwgrad(maxgrad), mc3mpwesgr(10,maxgrad)      1011YZ03
      double precision mg3grad(maxgrad)
      double precision mg3esgr(nummg3es,maxgrad)
      double precision mqcgrad(maxgrad), mqcesgr(5,maxgrad)             0224BL02
      double precision mcomp2grad(maxgrad),                             0627PJ00
     *                 mcomp2esgr(nummcomp2es, maxgrad)                 0627PJ00
      double precision mccograd(maxgrad),                               0713BL02
     *                 mccoesgr(nummccoes, maxgrad)                     0713BL02
      double precision imohcgrad(maxgrad), imohcesgr(3,maxgrad)


      COMMON /GRAD/ esgrad, mcgrad, hfmograd, mg2grad,
     * mg3grad, mg2esgr, mg3esgr, mqcgrad, mqcesgr,                     0106FP00
     * g2esgr, g2grad, g3esgr, g3grad, imohcgrad, imohcesgr,
     * mcomp2grad, mcomp2esgr, mccograd, mccoesgr,                      0713BL02
     * g3sxmp3grad, g3sxmp3esgr, mc3bbgrad, mc3bbesgr,                  1011YZ03
     * mc3mpwgrad, mc3mpwesgr
      end module gradient
c     
c
c******************************************************************************
c     MODULE:HESSIAN
c******************************************************************************
c
      module hessian
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:  January 6, 2000 by P. L. Fast
c     Purpose:  To create common block for all the hessians calculated by
c        Multilevel and gathered from the electronic structure program.
c
      implicit none
 
      integer, parameter, private :: numes    = 6
      integer, parameter, private :: numbas   = 3
      integer, parameter, private :: numcalc  = 44
      integer, parameter, private :: numg2est = 10
      integer, parameter, private :: numg3est = 9
      integer, parameter, private :: nummg2es = 10
      integer, parameter, private :: nummg3es = 9
      integer, parameter, private :: nummqces = 4                       0106PF00
      integer, parameter, private :: nummcomp2es = 4                    0627PJ00
      integer, parameter, private :: nummccoes = 4                      0713BL02
      integer, parameter, private :: nummc3bbes = 3                     1011YZ03
      integer, parameter, private :: nummc3mpwes = 3                     1011YZ03
      integer, parameter, private :: maxatm = 50
      integer, parameter, private :: maxhess  = 3*maxatm
c
c  hfmohess(1) = hf hess
c  hfmohess(2) = mo hess
c  hfmohess(3) = hf||mo hess
c
      double precision hfmohess(3,maxhess,maxhess)
      double precision eshess(numes, numbas,maxhess, maxhess)
      double precision mchess(numcalc,maxhess, maxhess)
      double precision g2hess(maxhess,maxhess)
      double precision g2eshs(numg2est,maxhess,maxhess)
      double precision mg2hess(maxhess,maxhess)
      double precision mg2eshs(nummg2es,maxhess,maxhess)
      double precision g3hess(maxhess,maxhess)
      double precision g3eshs(10,maxhess,maxhess)                       0224BL02
      double precision g3sxmp3hess(maxhess,maxhess)                     1011YZ03
      double precision g3sxmp3eshs(10,maxhess,maxhess)                  1011YZ03
      double precision mc3bbhess(maxhess,maxhess)                       1011YZ03
      double precision mc3bbeshs(3,maxhess,maxhess)                     1011YZ03
      double precision mc3mpwhess(maxhess,maxhess)                      1011YZ03
      double precision mc3mpweshs(3,maxhess,maxhess)                    1011YZ03
      double precision mg3hess(maxhess,maxhess)
      double precision mg3eshs(nummg3es,maxhess,maxhess)
      double precision mqchess(maxhess,maxhess)                         0809BL00
      double precision mqceshs(5,maxhess,maxhess)                       0224BL02
      double precision mcomp2hess(maxhess, maxhess)                     0517PJ01
      double precision mcomp2eshs(nummcomp2es, maxhess, maxhess)        0627PJ00
      double precision mccohess(maxhess, maxhess)                       0713BL02
      double precision mccoeshs(nummccoes, maxhess, maxhess)            0713BL02
      double precision imohchess(maxhess,maxhess)
      double precision imohceshs(3,maxhess,maxhess)

 
      COMMON /HESS/ eshess, mchess, hfmohess, mg2hess,
     * mg3hess, mg2eshs, mg3eshs, mqchess, mqceshs,                     0106PF00
     * g2hess, g2eshs, g3hess, g3eshs, imohchess, imohceshs,
     * mcomp2hess, mcomp2eshs, mccohess, mccoeshs,                      0713BL02
     * g3sxmp3hess, g3sxmp3eshs, mc3bbhess,mc3bbeshs,                   1011YZ03
     * mc3mpwhess,mc3mpweshs
      end module hessian
c
c
c******************************************************************************
c     MODULE:CALTYP
c******************************************************************************
c
      module caltyp
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:
c     Purpose:  To indicate the type of calculation being called in a
c        program hook or the type of calculation being displayed by a disp
c        subroutine 
c
      implicit none

      integer, parameter :: tener = 1
      integer, parameter :: tgrad = 2
      integer, parameter :: thess = 3
      integer, parameter :: topt  = 4

      end module caltyp
c
c
c******************************************************************************
c     MODULE:OPTIMIZE
c******************************************************************************
c
      module optimize
c
c     Created:  Summer 1999 by J. M. Rodgers
c     Revised:
c     Purpose:  To create a common block for the information necessary in
c        the optimization routines (which it is too complicated to pass
c        around as an argument 
c
      implicit none

      integer, parameter, private :: maxatm = 50
      integer, parameter, private :: n3tm = 3*maxatm
 
      double precision :: ener, grad(n3tm), hess(n3tm,n3tm)
      double precision :: xcom(n3tm), xicom(n3tm), lutiny, cutoff

      COMMON /OPT/  ener, grad, hess, xcom, xicom, lutiny, cutoff

      end module optimize


c******************************************************************************
c     MODULE:PSEUDOPOT
c******************************************************************************
c
      module pseudopot 
c
c     Created:  Fall 2013 by R. Meana-Paneda
c     Revised:
c     Purpose:  To create a common block for the information necessary if
c        a pseudopotential is input through the GENECP keyword. The
c        genecp variable contains the path of the file where all basis sets are
c        located. Only works for EXTOPT and TEST options.
c
c
      implicit none

      integer  lgenecp
      character*20  genecp
 
      COMMON /genecpcom/ genecp,lgenecp

      end module pseudopot 


