
                   I N T E R F (diatomic codes only)

	NOTE: While many of the outer region codes have being updated to take
	      advantage of the Partitioned R-Matrix method, these code changes
	      have not being applied to Interf. This may cause errors when interf
	      is run using support code (like outerio.f) that has being updated
	      to a Partitioned R-Matrix version.

      INTERF provides the interface between the inner region (ALCHEMY based)
      codes and the outer region package of programs.  It is intended that
      as far as possible, changes in the outer region codes necessitated
      by changes in the inner region codes be localised in this module.

      Input files:
        Buttle corrections               (on unit LUBUT )
        Boundary amplitudes              (on unit LUAMP )
        CI eigenvalues and eigenvectors  (on unit LUCI  )
        Target data                      (on unit LUTARG)

      Output files:
        Channel and target data          (on unit LUCHAN)
        R-matrix data                    (on unit LURMT )


      The following PARAMETERs are used to define array dimensions

      MAXCH  = 100 maximum number of fixed nuclei scattering channels
      MAXTGT = 10  maximum number of target electronic states

      Namelist input /INTFIN/

        The format of the following is 
       (Name, Type, Dimension, Default, Limits, ! description)
        Unless specified otherwise, the default value applies to all elements
        of array variables.
        
        ALPHA0   R   1          0.    [:]
           ! Spherical part of static polarizability

        ALPHA2   R   1          0.    [:]
           ! Non spherical part of static polarizability

        ESHIFT   R   MAXTGT     0.
           ! Shifts to be applied to energies on target properties file

        GUTOT    I   1          0     [-1:1]     
           ! G/U symmetry of total system

        IAFORM   C   1         'U'   ['U'|'F']
           ! unused

        IBFORM   C   1         'U'   ['U'|'F'] 
           ! unused

        ICFORM   C   1         'U'   ['U'|'F']
           ! format flag for channel dataset, 'F' for formatted, 'U' for
             unformatted

        IDTARG   I   MAXTGT           [1:]
           ! array which specifies which NTARG target states are to
             be selected from the properties file on unit LUTARG. 
             IDTARG(I)=K is defined such that index I is given by the
             order in which states are used in congen and K refers to
             the state being the Kth in energy order (see target
             property file).

        IMCSF    I   (2,2*MAXTGT) 1   [0:]
           ! This array is necessary to match the CSF data generated in CONGEN
             with (energy) order in which states must appear in outer.
             I runs over target states in the order in which they are
             processed in the N+1 electron (ie scattering) CONGEN run. If 
             any target state is associated with continuum orbitals with 
             two different symmetries then it must appear twice in the list.
             IMCSF(1,I) = label of energy ordered target state
                          (usually the order states are found in the target 
                           property file)
             IMCSF(2,I) = m symmetry associated with the continuum orbitals 
                          that are coupled with each target state in order 
                          to produce the N+1 wavefunction

        IPRNT    I   6          0    [-1,0,1]
           ! Debug print switches :
             In each case -1 gives less than the default output and +1
             more than the default
                 (1) exact copy of output to LUCHAN
                 (2) multipole coefficients of asymptotic potential
                 (3) input CI eigenvalues and first element of each
                     eigenvector
                 (4) input boundary amplitudes
                 (5) Buttle corrections
                 (6) exact copy of output to LURMT

        IRFORM   C   1         'U'   ('U'|'F')
           ! format flag for R-matrix dataset, 'F' for formatted, 'U' for
             unformatted

        ISGN     I   1          1    (-1|+1)
           ! +/- symmetry for overall Sigma symmetry

        ISMAX    I   1          0    [0:]        
           ! maximum multipole to be retained in expansion of
             long range potentials (note that if either ALPHA0 or ALPHA2
             is non-zero then ISMAX must be at least 3)

        IWRITE   I   1          6    [1:]        
           ! logical unit for printed output

        LUAMP    I   1         22    [1:]
           ! logical unit holding boundary amplitudes

        LUBUT    I   1         22    [1:]
           ! logical unit holding Buttle corrections, if zero then
             no corrections are written to R-matrix dataset

        LUCHAN   I   1         10    [1:]        
           ! logical unit for output channel and target dataset

        LUCI     I   1         25    [1:]
           ! logical unit holding CI eigenvalues and eigenvectors

        LURMT    I   1         21    [1:]
           ! logical unit holding output R-matrix poles and amplitudes
             together with multipole expansion of asymptotic potentials,
             parameterized Buttle corrections and any CI vectors needed
             for a non-adiabatic treatment of nuclear motion

        LUTARG   I   1         24    [1:]
           ! logical unit holding input target data

        MGVN     I   1               [0:]
           ! total symmetry of system

        NAME     C   60                          
           ! title for any output

        NASET    I   1          1    [0:]
           ! Boundary amplitude set number (if 0 then dataset is assumed
             to be old style without a header)

        NBSET    I   1          1    [0:]
           ! Buttle correction set number (if 0 the dataset is assumed
             to be old style without a header)

        NCHSET    I   1          1    [0:]        
           ! set number of channel dataset (if 0 then set is appended to
             the end of an existing file)

        NCISET    I   1          1    [0:]
           ! CI data set number

        NELT     I   1               [1:]
           ! number of target electrons

        NLTARG   I   MAXTGT*2          [0,]
           ! number of partial waves (l values) to be retained for each 
             target state (and m value).  If unset(0) then code interrogates 
             boundary amplitude file to discover how many l values are 
             available (this is the recommended option).

        NMTARG   I   MAXTGT          [0,1,2]
           ! number of M values to be retained for each target state.
             The default is 1 for sigma states, 2 for others.

        NOCSF    I   0               [1:]      
           ! number of CSFs generated by the CI code. (note that here
             NOCSF corresponds to the variable NKEEP of the CI code)
             The default is to use the value obtained from the header
             of the first set on unit LUCI.

        NPOLE    I   1          0    [0:]        
           ! number of R-matrix poles which may be are to be treated as
             coupled (not just non-adiabatic or diabatically crossing)
             in the vibrational motion code (VIBRMT).  This parameter
             actually specifies the number of CI eigenvectors which are
             to be appended to the R-matrix dataset

        NRMSET    I   1          1    [0:]
           ! set number of R-matrix dataset (if 0 then set is appended to
             the end of an existing file)

        NSTAT    I   1       NOCSF   [1:]        
           ! number of poles retained in the expansion of the R-matrix

        NTARG    I   1          1    [1:]
           ! number of target electronic states to be read from the target
             property file. This will be equal to or greater than the 
             number of target states needed for IMCSF as states which are
             not coupled in the present run should still be counted for NTARG.

        NTSET    I   1          1    [0:]
           ! Target data set number

        NUCCEN   I   1          3    [1|2|3]
           ! label of 'nuclear' centre associated with the continuum orbitals

        NVO      I   MAXTGT     MAXTGT*0
           ! number of virtual orbitals preceding continuum orbitals in
             CONGEN WFNGRP.  Ordering is the same as IMCSF

        R        R   1               [0.:]        
           ! internuclear separation  

        RMATR    R   1               [0.:]
           ! R-matrix radius for electronic problem

        STOT     I   1               [1:]        
           ! spin multiplicity of total system
