                 R S O L V E

      RSOLVE is the main driving routine of the package.  It takes pre-
      procesed data from SWINTERF/INTERF (and optionally VIBRMT) then outputs 
      K-matrices. The asymptotic codes RPROP and CFASYM are called and 
      require their own namelist input (see below). If RSOLVE is being 
      used in conjunction with VIBRMT to produce vibrationally resolved 
      K-matrices then namelist input for VIBINI is also required (see below)

      Input files:
        Target and channel data                 (on unit LUCHAN)
        Fixed nuclei R-matrix data              (on unit LURMT )
       (Vibration and dissociation channel data (on unit LUVCHN))
       (Non-adiabatic R-matrix data             (on unit LUNRMT))

      Output files:
        K-matrices                              (on unit LUKMT )


      The following PARAMETERs are used to define array dimensions

      MAXFCH =100  maximum number of fixed nuclei scattering channels
      MAXTGT = 20  maximum number of target electronic states
      MAXPTS = 30  maximum number of geometries
      MAXPOL = 20  maximum number of non-adiabatic R-matrix poles
      MAXENR = 10  maximum number of input scattering energy pairs
                   

      Namelist input /RSLVIN/

        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.
        

        BBLOCH   R   1          0.    [:]
           ! Coefficient in electronic Bloch operator

        BIGB     R   1          0.    [:]
           ! Coefficient in nuclear Bloch operator

        EINC     R   2*MAXENR   0.    [:]
           ! Scattering energies relative to lowest (vibrational)
                 level of target 
                 EINC(1,I) = initial energy in sub range I
                 EINC(2,I) = energy increment in this subrange
                 units are as specified by IEUNIT

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

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

        IEUNIT   I   1          1    [1,2]  
           ! units in which input scattering energies are input
                 1= Ryd, 2= eV

        IKFORM   C   1         'U'   ['U'|'F']
           ! Formatted/unformatted switch for unit LUKMT

        IKTYPE   I   1          0    [0|1]
           ! write asymptotic part of the K-matrix (open × open) only
           ! or the full (nchan × nchan) K-matrix to LUKMT
           !     = 0  ... only open channels sub-block of K-matrix
           !     = 1  ... full K-matrix, including closed channels

        INRFRM   C   1         'U'   ['U'|'F']
           ! Formatted/unformatted switch for unit LUNRMT

        IPRNT    I   6          0    [0|1]
           ! Debug print switches :
             In each case -1 gives less than the default output and +1
             more than the default
                 (1) =1 Print all input data
                 (2) =1 Print vibrational wavefuction data
                 (3) =1 Debug output in dissociating channels
                 (4)  not used
                 (5) =1 Print R-matrices
                 (6) =1 Print all output data (K-matrices and the file 
                        headers)

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

        ISMAX    I   1         -1    [0:]        
           ! maximum multipole to be used in the expansion of the
             long range potentials (note that if either ALPHA0 or ALPHA2
             is non-zero then ISMAX must be at least 3). If not set, it
             is read from the SWINTERF output.  

        IVCFRM   C   1         'U'   ['U'|'F']
           ! Formatted/unformatted switch for unit LUVCHN

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

        LUCHAN   I   1         10    [1:]        
           ! logical unit for input channel and target datasets

        LUKMT    I   1         19     [1:]
           ! logical unit for K-matrix output 

        LUNRMT   I   1         29     [1:]
           ! Logical unit holding non adiabatic R-matrix data

        LURMT    I   1         21    [1:]
           ! logical unit holding input R-matrix poles and amplitudes
             together with multipole expansion of asymptotic potentials,
             and parameterized Buttle corrections 

        LUVCHN   I  1          28    [1:]
           ! Logical unit holding vibrational/dissociating
             channel data

        MDMAX    I  1           0    [0:]
            ! maximum multipole to be retained in expansion of
              asymptotic internuclear (dissociation) potential
        MGVN     I   1               [0:]
           ! total symmetry of system

        NAME     C   60                          
           ! title for any output

        NCHSET    I   1          1    [0:]        
           ! set numbers of required channel dataset(s)

        NDIS      I   1          0    [0:NPOLE]
           ! number of dissociating channels

        NERANG    I   1          1    [1:MAXENR]
           ! Number of subranges of scattering energies

        NESCAT    I   NERANG     1    [1:]
           ! number of input scattering energies in each subrange
        NEWBUT    I   1          1    [0:1]
           ! switch to put channel energies (rather than ground state
             energies) into the Buttle correction
        NGEOM     I   1          1    [1:]
           ! number of target geometries

        NKSET     I   1          1    [0:]
           ! Set number for output K-matrices 

        NLPOLE    I   1          1    [1:NPOLE]
           ! Label of first R-matrix pole to be treated non-adiabtically
             inc constructing vibrationally resolved R-matrices

        NNRSET    I   1          1    [1:]
           ! Set number for input non-adiabatic R-matrix data

        NPOLE    I   1          0    [0:]        
           ! number of R-matrix poles which have be treated non-adiabatically
             in the vibrational motion code (VIBRMT).  This parameter is not
             required for fixed nuclei (or adiabatic nuclei) calculations

        NRMSET    I   1          1    [0:]
           ! set number of required R-matrix dataset(s)

        NRQUAD    I   1        201    [1:]
           ! number of quadrature points for integrals in adiabatic
             approximation ( if =0 then code decides)

        NVCSET    I   1          1    [1:]
           ! Set number for input vibrational/dissociating channel
             data

        NVTARG    I MAXTGT       1    [1:]
           ! number of vibrational levels for each target state

        R         R   NGEOM           [0.:]        
           ! internuclear separations

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