
              R E S O N

RESON automatically detects resonances, sets up a grid of points about
the resonance and performs a least squares fit to a Breit-Wigner form
see: J. Tennyson and C.J. Noble, Computer Phys. Comms. 33, 421 (1984).


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))
  K-matrices                              (on unit LUKMT )

Scratch file:
  K-matrices in region of the resonances  (on unit LURES )

The following parameters are used to define array dimensions

MAXPTS = 30  maximun number of geometries
MAXPOL = 20  maximum number of nonadiabatic R-matrix poles
MAXTGT = 20  maximum number of target electronic states
MAXENR = 10  maximum number of input scattering energy pairs (E0,DE)
MAXFCH = 100 maximum number of fixed nuclei scattering channels

Basic data is input via NAMELIST /RES/, data maybe required via
NAMELIST /VIBIN/ and is required via NAMELIST /BPROP/.

Namelist input /RES/

 The format of the following is
(Name, Type, Dimension, Default Limits, ! Description)
 Unless specifyied otherwise, the default values applies to all elements
 of array variables.

        ABVTHR   R       1        0.        [0.:]
          ! minimum energy above an electronic threshold which can be used in
            fitting resonances to a Breit-Wigner profile

        BELTHR   R       1        0.        [0.:]
          ! minimum energy below an electronic threshold which can be used in
            fitting resonances to a Breit-Wigner profile

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

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

        DPHZ     R       1        1.        [0.:]
          ! Smallest change in eigenphase sum that constitutes a resonance.
            If values less that 1. are used (for example because of a sharply
            decreasing background) then fits to non-existant resonances maybe
            produced.

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

        IBRANCH  I       1        0         [:]
          ! Flag to construct and diagonalise time delay matrix.
             IBRANCH == 0 Don't diagonalise
             IBRANCH != 0 Diagonalise the time delay matrix and print
                          the results to IWRITE.

        ICFORM   C       1       'U'        ['U':'F']
          ! Formatted/unformatted switch for unit LUCHAN

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

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

        IPRNT    I       6        0         [-1:1]
          ! Debug print switches
             (1) =1 Print all input data
             (2) =1 Print vibrational wavefuction data
             (3) =1 Debug output in dissociating channels
             (4) =1 Print resonance fitting information
             (5) =1 Print R-matrices
             (6) =1 Print all output data

        IRFORM  C       1       'U'        ['U':'F']
          ! Formatted/unformatted switch for unit LURMT

        ISMAX   I       1        0         [0:]
          ! Highest multipole to be used in asymptotic expansion
            of asymptotic potentials

        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 holding fixed nuclei channel and target data

        LUKMT   I       1       11         [1:]
          ! Logical unit for K-matrix input

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

        LURES   I       1       18         [1:]
          ! Logical unit for K-matrix data for resonance fits

        LURMT   I       1       21         [1:]
          ! Logical unit holding fixed nuclei R-matrix data

        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 output

        NBACK   I       1        2         [0:]
          ! Number of terms in polynomial fit to background eigenphase sum

        NCHSET  I       1        1         [0:]
          ! Set numbers for input fixed nuclei channel/target
            data for each geometry

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

        NFIT    I       1       20         [NBACK+3:]
          ! Number of energy points to be generated for each resonance fit

        NGEOM   I       1        1         [1:]
          ! Number of geometries

        NKSET   I       1        1         [1:]
          ! Set number of input K-matrix

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

        NPOLE   I       1        0         [0:]
          ! Number of electronic R-matrix poles to be treated
            non-adiabatically

        NRESON  I       1       20         [1:]
           ! Number of resonances to be located and fitted between each
             electronic threshold

        NRMSET  I       1        1         [0:]
           ! Set numbers for input fixed nuclei R-matrix data for each geometry

        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.:]
           ! Array holding internuclear separations

        STOT    I       1                  [1:]
           ! Spin multiplicity 2*S+1 where S = total spin of system

        TOL     R       1     1.0D-05      [  ]
           ! Tolerance parameter used in subroutine LMDIF1. Relative
             error in the sum of squares in subroutine must be at
             most tol.

        TSCALE  R       1     50.0D0       [1:]
           ! (if IBRANCH != 0) Time delay matrix to be diagonalised.
             Constructed using energy points separated by gamma/TSCALE.
