C LAST UPDATE:
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C*************************
C**       RECCEL        **
C*************************
C
C
      SUBROUTINE RECCEL(RX, CX, WAVE)
C
C Purpose: Convert between real and reciprocal cell parameters. C input,
C          R output; angles in degrees
C
      REAL RX(6)
      REAL CX(6)
      REAL WAVE
C
C Arguments
C
C RX   (W)  Converted cell (Angstroms and degrees)
C CX   (R)  Input cell (Angstroms and degrees)
C WAVE (R)  Standard wavelength (Angstroms)
C
C LOCALS:

      REAL C(6)
      REAL DTOR
C
C-------------------------------------------------------------------------------
C
      DTOR = 0.0174533

      DO 10 I = 1, 3
         C(I) = CX(I)
 10   CONTINUE

      SUM = 0.
      DO 20 I = 4 , 6
         C(I) = DTOR*CX(I)
         SUM = SUM + 0.5*C(I)
 20   CONTINUE
 
      V = 1.
      DO 30 I = 4 , 6
         V = V*SIN(SUM-C(I))
 30   CONTINUE
 
      WV = WAVE/(2.*C(1)*C(2)*C(3)*SQRT(SIN(SUM)*V))

      RX(1) = C(2)*C(3)*SIN(C(4))*WV
      RX(2) = C(1)*C(3)*SIN(C(5))*WV
      RX(3) = C(1)*C(2)*SIN(C(6))*WV
 
      RX(4) = ACOS((COS(C(5))*COS(C(6))-COS(C(4)))
     +       /(SIN(C(5))*SIN(C(6))))
      RX(4) = RX(4)/DTOR

      RX(5) = ACOS((COS(C(6))*COS(C(4))-COS(C(5)))
     +       /(SIN(C(6))*SIN(C(4))))
      RX(5) = RX(5)/DTOR

      RX(6) = ACOS((COS(C(4))*COS(C(5))-COS(C(6)))
     +       /(SIN(C(4))*SIN(C(5))))
      RX(6) = RX(6)/DTOR
 
      RETURN
      END
