      SUBROUTINE AMPSUM(ICORE,MAXCOR,IUHF,NLIST,SING1,TYPE)
C
C THIS ROUTINE DRIVES A NUMBER OF ROUTINES WHICH DETERMINE AND PRINT
C  OUT THE LARGEST T2 AMPLITUDES.  ALL THREE SPIN CASES DONE FOR UHF,
C  AB ONLY FOR RHF.
C
c  NLIST -- list from which to read amplitudes
c           0 -- T amplitudes, 100 -- lambda
c  SING1 -- .TRUE. if singles included in calculation
c  TYPE  -- character*1 label for printouts ( usually 'T' or 'L')
CEND
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      LOGICAL SING1
      CHARACTER*1 TYPE
      DIMENSION ICORE(MAXCOR)
      COMMON /FLAGS/ IFLAGS(100)
      IF(IUHF.NE.0)THEN
       DO 10 I=1,2
        IF(SING1)CALL SORTT1(ICORE,MAXCOR,I,90+NLIST,IFLAGS(14),TYPE)
        CALL SORTT2(ICORE,MAXCOR,I,43+I+NLIST,IFLAGS(14),TYPE)
10     CONTINUE
       I=3
       CALL SORTT2(ICORE,MAXCOR,I,43+I+NLIST,IFLAGS(14),TYPE)
      ELSE
       IF(SING1)CALL SORTT1(ICORE,MAXCOR,1,90+NLIST,IFLAGS(14),TYPE)
       CALL SORTT2(ICORE,MAXCOR,1,44+NLIST,IFLAGS(14),TYPE)
       CALL SORTT2(ICORE,MAXCOR,3,46+NLIST,IFLAGS(14),TYPE)
      ENDIF
      RETURN
      END
