      SUBROUTINE SYMTRA(IRREP,NUM1,NUM2,DISSIZE,A,B)
C
C  THIS ROUTINE TRANSPOSES THE LAST TWO INDICES OF A GIVEN MATRIX A
C
C    A(I,J,K,L) --> B(I,J,L,K)
C
C  NOTE THAT THIS IS NOT CARRIED OUT IN PLACE ( SEE THEREFORE SYMTR1)
C
C     INPUT : IRREP ....... IRREP OF THE GIVEN PART OF A
C             NUM1 ........ POPULATION VECTOR OF K
C             NUM2 ........ POPULATION VECTOR OF L
C             DISSIZE ..... DISTRIBUTION SIZE OF A
C             A       ..... INPUT MATRIX
C
C     OUTPUT : B .......... TRANSPOSED INPUT MATRIX A
C
CEND
C
C CODED JULY/90   JG
C
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      INTEGER DISSIZE,DIRPRD
      DIMENSION A(DISSIZE,1),B(DISSIZE,1),NUM1(8),NUM2(8)
      COMMON /SYMINF/NSTART,NIRREP,IRREPA(255),IRREPB(255),
     &DIRPRD(8,8)
      DIMENSION IPI(8),IPJ(8)
C
      IPI(1)=0
      IPJ(1)=0          
      DO 10 IRREPJ=1,NIRREP-1
       IRREPI=DIRPRD(IRREP,IRREPJ)
       IPJ(IRREPJ+1)=IPJ(IRREPJ)+NUM2(IRREPJ)*NUM1(IRREPI)
       IPI(IRREPJ+1)=IPI(IRREPJ)+NUM1(IRREPJ)*NUM2(IRREPI)
10    CONTINUE
       
C
      DO 20  IRREPJ=1,NIRREP
       NUMJ=NUM2(IRREPJ)
       IRREPI=DIRPRD(IRREP,IRREPJ)
       NUMI=NUM1(IRREPI)
        DO 15 J=1,NUMJ
        DO 15 I=1,NUMI
         IND1=IPJ(IRREPJ)+(J-1)*NUMI+I
         IND2=IPI(IRREPI)+(I-1)*NUMJ+J
         DO 11 L=1,DISSIZE
          B(L,IND2)=A(L,IND1)
11       CONTINUE
15      CONTINUE
20     CONTINUE
      RETURN
      END
