anchor.diff:           CH(I) = CH(I)*1.D3
         ENDDO
   C
  +      WRITE (9,*) 'About to call SWILT', CH(M_in)
  +      CLOSE(9)
  +      OPEN (9, FORM='FORMATTED', FILE='debug.log', POSITION='APPEND')
  +C
   C First fit SWILT because it takes into account limits at 0 and infinite T
            CALL SWILT(SNAM,ENAM,ELNO,STRUC_MOL,ATOMS,ROTORS,THERM1,
        &                TEMP,CPT,CH,CS,M_in)
  +C
  +      WRITE (9,*) 'Completed the Wilhoit fitting in SWILT'
  +      CLOSE(9)
  +      OPEN (9, FORM='FORMATTED', FILE='debug.log', POSITION='APPEND')
   C
         IF (DATATYPE .EQ. 'WILH') GOTO 3000
   C
  
positive.code:         CALL DATAFIND(THERM1,TEMF(I),CPF(I),CHF(I),CSF(I))
          CHF(I) = CHF(I)/1.D3
        ENDDO
  C
        DO I=12,101
  C     90 points between 298 and 6000
  
negative.code: C
   3000 CONTINUE
  C
        WRITE(9,*) 'About to call PRINT_THERM'
        CLOSE(9)
        OPEN (9, FORM='FORMATTED', FILE='debug.log', POSITION='APPEND')
        
        CALL PRINT_THERM(T_int,T_int1,SNAM,ENAM,ELNO,MW,H_298,DLTH,
       &                   DATATYPE,LOUT,THERM1,THERM2,THERM3,J_elem,
       &                 T_min,T_max)
  C
  C     CLOSE(LOUT)
        WRITE(9,*) 'Finished everything'
        CLOSE(9)
        WRITE(LOUT,*) 'GATPFIT_HAS_FINISHED_ONE_INPUT'
        FLUSH(LOUT)
        GOTO 34501
  
  34511 CONTINUE
        CLOSE(9)
  C
        END
  C***********************************************************************
  