      SUBROUTINE FSINIPOP(IVECTOR,IVECDIM,IUHF)
C
C INITIALIZES THE FSSYM COMMON BLOCK.  TRICKY STUFF, SORT OF.
C
      IMPLICIT INTEGER (A-Z)
      DIMENSION IVECTOR(IVECDIM,3,2)
      COMMON /MACHSP/ IINTLN,IFLTLN,IINTFP,IALONE,IBITWD
      COMMON /SYMINF/ NSTART,NIRREP,IRREPS(255,2),DIRPRD(8,8)
      COMMON /SYMPOP/ IRPDPD(8,22),ISYTYP(2,500),ID(18)
      COMMON /FSSYMPOP/ FSDPDAN(8,22),FSDPDNA(8,22),FSDPDAA(8,22),
     &                  FSDPDIN(8,22),FSDPDNI(8,22),FSDPDII(8,22),
     &                  FSDPDAI(8,22),FSDPDIA(8,22)
      COMMON /SYM/ POP(8,2),VRT(8,2),NT(2),NFMI(2),NFEA(2)
      COMMON /FSSYM/ POPA(8,2),POPI(8,2),VRTA(8,2),VRTI(8,2),
     &               NTAN(2),NTNA(2),NTAA(2),
     &               NTIN(2),NTNI(2),NTII(2),
     &               NTAI(2),NTIA(2),
     &               NF1AN(2),NF1AA(2),NF1IN(2),NF1II(2),NF1AI(2),
     &               NF2AN(2),NF2AA(2),NF2IN(2),NF2II(2),NF2AI(2)
C
C DIRTY STUFF!
C
      CALL IZERO(POPA,100)
C
C DETERMINE ACTIVE POPULATIONS
C
      DO 10 ISPIN=1,1+IUHF
       ITHRU=0
       DO 20 IRREP=1,NIRREP
        NOCC=POP(IRREP,ISPIN)
        IX=0
        DO 30 I=1,NOCC
         ITHRU=ITHRU+1
         IF(IVECTOR(ITHRU,2,ISPIN).EQ.0)IX=IX+1
30      CONTINUE
        POPA(IRREP,ISPIN)=IX
        POPI(IRREP,ISPIN)=POP(IRREP,ISPIN)-POPA(IRREP,ISPIN)
20     CONTINUE
C
       DO 21 IRREP=1,NIRREP
        NVRT=VRT(IRREP,ISPIN)
        IX=0
        DO 31 I=1,NVRT
         ITHRU=ITHRU+1
         IF(IVECTOR(ITHRU,2,ISPIN).EQ.0)IX=IX+1
31      CONTINUE
        VRTA(IRREP,ISPIN)=IX
        VRTI(IRREP,ISPIN)=VRT(IRREP,ISPIN)-VRTA(IRREP,ISPIN)
21     CONTINUE       
C
       DO 22 IRREP=1,NIRREP
C
        NF1AN(ISPIN)=NF1AN(ISPIN)+POPA(IRREP,ISPIN)*POP(IRREP,ISPIN)
        NF1AA(ISPIN)=NF1AA(ISPIN)+POPA(IRREP,ISPIN)*POPA(IRREP,ISPIN)
        NF1IN(ISPIN)=NF1IN(ISPIN)+POPI(IRREP,ISPIN)*POP(IRREP,ISPIN)
        NF1II(ISPIN)=NF1II(ISPIN)+POPI(IRREP,ISPIN)*POPI(IRREP,ISPIN)
        NF1AI(ISPIN)=NF1AI(ISPIN)+POPA(IRREP,ISPIN)*POPI(IRREP,ISPIN)
C
        NF2AN(ISPIN)=NF2AN(ISPIN)+VRTA(IRREP,ISPIN)*VRT(IRREP,ISPIN)
        NF2AA(ISPIN)=NF2AA(ISPIN)+VRTA(IRREP,ISPIN)*VRTA(IRREP,ISPIN)
        NF2IN(ISPIN)=NF2IN(ISPIN)+VRTI(IRREP,ISPIN)*VRT(IRREP,ISPIN)
        NF2II(ISPIN)=NF2II(ISPIN)+VRTI(IRREP,ISPIN)*VRTI(IRREP,ISPIN)
        NF2AI(ISPIN)=NF2AI(ISPIN)+VRTA(IRREP,ISPIN)*VRTI(IRREP,ISPIN)
C
        NTAN(ISPIN)=NTAN(ISPIN)+VRTA(IRREP,ISPIN)*POP(IRREP,ISPIN)
        NTNA(ISPIN)=NTNA(ISPIN)+VRT(IRREP,ISPIN)*POPA(IRREP,ISPIN)
        NTAA(ISPIN)=NTAA(ISPIN)+VRTA(IRREP,ISPIN)*POPA(IRREP,ISPIN)
        NTIN(ISPIN)=NTIN(ISPIN)+VRTI(IRREP,ISPIN)*POP(IRREP,ISPIN)
        NTNI(ISPIN)=NTNI(ISPIN)+VRT(IRREP,ISPIN)*POPI(IRREP,ISPIN)
        NTII(ISPIN)=NTII(ISPIN)+VRTI(IRREP,ISPIN)*POPI(IRREP,ISPIN)
        NTAI(ISPIN)=NTAI(ISPIN)+VRTA(IRREP,ISPIN)*POPI(IRREP,ISPIN)
        NTIA(ISPIN)=NTIA(ISPIN)+VRTI(IRREP,ISPIN)*POPA(IRREP,ISPIN)
C
22     CONTINUE
C
10    CONTINUE
C
      RETURN
      END
