C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LRL_GETMULT      **
C**************************
C
C
      SUBROUTINE LRL_GETMULT (MULTFLAG, MULT, MINHARM, MAXHARM, INCHARM)      
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Unpack multiplicities flag as stored in reflection list
C
C Author:  John W. Campbell, July 1993
C
C **** Service Routine Only ****
C
C Arguments:
C
      INTEGER MULTFLAG
      INTEGER MULT
      INTEGER MINHARM
      INTEGER MAXHARM
      INTEGER INCHARM
C
C MULTFLAG  (R)   Packed 'LRL' multiplicities flag
C MULT      (W)   Returns multiplicity
C MINHARM   (W)   Returns minimum harmonic number (0 if single)
C MAXHARM   (W)   Returns maximum harmonic number (0 if single)
C INCHARM   (W)   Returns harmonic increment (0 if single)
C
C
C====== LOCALS:
C
      INTEGER I
      INTEGER NTWO20
      INTEGER NTWO12
      INTEGER NTWO4

C     INTEGER I           !Temp. integer value
C     INTEGER NTWO20      !2**20
C     INTEGER NTWO12      !2**12
C     INTEGER NTWO4       !2**4

      DATA NTWO20/1048576/
      DATA NTWO12/4096/
      DATA NTWO4/16/
C
C-------------------------------------------------------------------------------
C
      MULT = 0
      MINHARM = 0
      MAXHARM = 0
      INCHARM = 0
      IF (MULTFLAG.EQ.0) RETURN
      IF (MULTFLAG.EQ.1) THEN
         MULT = 1
         RETURN
      END IF
      I = MULTFLAG
      MULT = I/NTWO20
      I = I - NTWO20*MULT
      MINHARM = I/NTWO12
      I = I - NTWO12*MINHARM
      MAXHARM = I/NTWO4
      INCHARM = I - NTWO4*MAXHARM
      RETURN
      END
