      SUBROUTINE KONSET(KONI,KONO)
C 
C  CHECK FOR MIRROR IMAGE CONSTRUCT; IF NONE, SETUP ONE 
C  * * *  CALLED BY STRCTL
      DIMENSION IFLG(6),XK(3),XX(3),XRHO(3),XCP(3)
CMDK NKONST
CMDK CNSTRK      
      DATA IDBG/0/
C 
      CALL ZERVI(6,IFLG)
      NLI=NLMP(KONI)
C 
C  SET MIRRORED DATA IN TEMPORARY ARRAYS
      IF(NLI.EQ.1)THEN
          XK(1)=WK(1,KONI)
          XX(1)=WX(1,KONI)
          XRHO(1)=WRHO(1,KONI)
          XCP(1)=WCP(1,KONI)
          ENDIF 
      IF(NLI.EQ.3)THEN
          I=NLI+1 
          DO 10 J=1,NLI 
          I=I-1 
          XK(I)=WK(J,KONI)
          XX(I)=WX(J,KONI)
          XRHO(I)=WRHO(J,KONI)
          XCP(I)=WCP(J,KONI)
   10     CONTINUE
          ENDIF 
C  NOW CHECK TO SEE IF ANY CONSTRUCT IS THE SAME AS MIRRORED DATA 
      DO 100 IK=1,NCONS 
      NL=NLMP(IK) 
      IF(NL.NE.NLI)GO TO 100
      DO 20 IL=1,NL 
      IF(XK(IL).NE.WK(IL,IK))GO TO 100
      IF(XX(IL).NE.WX(IL,IK))GO TO 100
      IF(XRHO(IL).NE.WRHO(IL,IK))GO TO 100
      IF(XCP(IL).NE.WCP(IL,IK))GO TO 100
   20 CONTINUE
C  ALL VALUES ARE EQUIVALENT, SO FOUND DESIRED CONSTRUCT!!! 
      KONO=IK 
      GO TO 130 
  100 CONTINUE
C - - -COULDNT FIND DESIRED CONSTRUCT, SO SET UP A NEW ONE
      NCONS=NCONS+1 
      IF(NCONS.GT.NKONST)STOP' KONSET: MUST INCREASE NKONST'
      KONO=NCONS
      IF(IDBG.NE.0)WRITE(60,500)KONO,NL
      DO 110 I=1,4
  110 IFXL(I,KONO)=0
      NLMP(KONO)=NL 
      DO 120 I=1,NL 
      WK(I,KONO)=XK(I)
      WX(I,KONO)=XX(I)
      WRHO(I,KONO)=XRHO(I)
      WCP(I,KONO)=XCP(I)
      IF(IDBG.NE.0)WRITE(60,501)I,XK(I),XX(I),XRHO(I),XCP(I) 
  120 CONTINUE
  130 CONTINUE
      RETURN
  500 FORMAT(1H0,'NEW MIRROR-IMAGE CONSTRUCT SETUP; KON,NL= ',2I5)
  501 FORMAT(1X,'LAYER NO.= ',I3,' K,X,RHO,CP= ',4G13.5)
      END 
