
                 T M T S U B 

      TMATSUB converts T-matrices obtained for linear molecules from the 
      polyatomic R-matrix package into a form which can be used as input
      to the 'diatomic' differential cross section code DCS.  It separates
      out a particular C-inf-v symmetry from the C2v and multiplies the
      T-matrix elements by the appropriate factors to convert from real
      spherical harmonics to complex. 

      Input files:
        Channel and target data          (on units LUCHNI)
        T-matrices                       (on units LUTMTI)

      Output files:
        Channel and target data          (on unit LUCHNO)
        T-matrices                       (on unit LUTMTO)


      The following PARAMETERs are used to define array dimensions

      MAXERN = 10  maximum number of energy subranges (defined in RSOLVE)
      MAXCH =1000  maximum number of scattering channels per symmetry
      MAXTGT = 10  maximum number of target vibronic states
      MAXSYM =100  maximum number of overall symmetries                   

      The data describing the run is input via namelist /SUBTIN/.

      Namelist input /SUBTIN/

        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.
        

        EMIN     R   1         0.    [0.:MAXE]
           ! minimum required scattering energy (in units as specified by 
             IEUNIT).  MAXE is the maximum energy on the T-matrix file

        EMAX     R   1         MAXE  [0.:MAXE]
           ! maximum required scattering energy (MAXE is the maximum energy
             on the T-matrix file)

        ICFORM   C   1         'U'   ['U'|'F']
           ! format flag for channel datasets, 'F' for formatted, 'U' for
             unformatted
         
        IDOUBLE  I   1          1    [0|1]
           ! if zero then correct T-matrices are output
             if 1 then T-matrix elements corresponding to mchl.gt.0 are
             multiplied by sqrt(2.).  This has the effect of taking into
             effect lambda doubling, so that there is no need to explicitly
             compute T-matrix elements for mchl.lt.0 

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

        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 input target data
                 (2) =1 Print input T-matrices
                 (3)  not used
                 (4)  not used
                 (5) =1 Print output channel data
                 (6) =1 Print output T-matrices

        ITFORM   C   1         'U'   ['U'|'F']
           ! Formatted/unformatted switch for T-matrix files

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

        LUCHNI   I   1         10    [1:]        
           ! logical unit for input channel and target dataset
           
        LUCHNO   I   1         11    [1:]        
           ! logical unit for output channel and target dataset.

        LUTMTI   I   MAXSYM    12    [1:]
           ! logical unit holding input T-matrices

        LUTMTO   I   1         13    [1:]
           ! logical unit holding output T-matrices

        MAXI     I   1          1    [1:NTARG]
           ! label of highest initial state for which cross-
             sections will be required.  In order to save space, only a
             subset of the entire T-matrix will in general be saved at
             each scattering energy. 

        MAXF      I   1         NTARG [1:NTARG]
           ! label of highest final state for which cross-sections
             will be required.

        EMIN     R   1         0.    [0.:MAXE]
           ! minimum required scattering energy (in units as specified by 
             IEUNIT).  MAXE is the maximum energy on the T-matrix file

        EMAX     R   1         MAXE  [0.:MAXE]
           ! maximum required scattering energy (MAXE is the maximum energy
             on the T-matrix file)

        MREQ     I   1               [0:]
           ! M-value of required C-inf-v symmetry

        NAME      C   60                          
           ! title for any output

        NCSETI    I   MAXSYM          1    [1:]        
           ! set numbers of required input channel datasets.

        NCSETO    I   1          1    [1:]        
           ! initial set number of output channel datasets, if zero then
             data is appended to the end of an existing file.

        NTSETI    I   1          1    [0:]
           ! Set number for input T-matrices 

        NTSETO    I   1          1    [0:]
           ! Set number for output T-matrices 

        R         R   NGEOM           [0.:]        
           ! same value as in previous modules

