      SUBROUTINE PAREXT
C     SUBROUTINE TO READ IN SPECIAL PARAMETER INFORMATION.
C     READ 1 CARD FOR EACH OF N SPECIAL PARAMETERS, CONTAINING THE
C     FOLLOWING INFORMATION.
C     COL 1-8     NAME OF PARAMETER - UP TO 8 ALPHANUMERIC CHARACTERS.
C     COL 9-10    TYPE OF PARAMETER. 1=SPECIAL COORDINATE SYSTEM (SHAPE
C                 CONSTRAINT) OR RIGID BODY THERMAL MOTION, 2=DEFINED BY
C                 USER IN SUBROUTINE SPDERI (SUPPLIED AS DUMMY).
C     0 INDICATES A LINEAR FUNCTION, WITH CCEFFICIENTS AS ON CONSTRAINT
C     CARDS
C     COL 11-12   NUMBER INDICATING WHICH OF SEVERAL SPECIAL COORDINATE
C                 OR RIGID BODY SYSTEMS THIS PARAMETER BELONGS TO.
C     COL 13-14   PARAMETER DESIGNATOR. IF TYPE 1, THE CODE IS AS
C                 FOLLOWS 1-X COORDINATE OF ORIGIN (IN CRYSTAL SYSTEM),
C                 2-Y COORDINATE OF ORIGIN, 3-Z COORDINATE OF ORIGIN,
C                 4-OMEGA ANGLE FOR TRANSFORM TO STANDARD, ORTHONORMAL
C                 SYSTEM, 5-CHI ANGLE FOR TRANSFORM, 6-PHI ANGLE FOR
C                 TRANSFORM, 7-X COORDINATE IS SPECIAL SYSTEM, 8-Y
C                 COORDINATE IS SPECIAL SYSTEM, 9-Z COORDINATE IN SPECI-
C                 AL SYSTEM, 10-T11, 11-T22, 12-T33,13-T12, 14-T13,
C                 15-T23, 16-L11, 17-L22, 18-L33, 19-L12, 20-L13, 21-L23
C                 22-S11, 23-S22, 24-S33, 25-12, 26-S13, 27-S23, 28-S21,
C                 29-S31, 30-S32.
C     COL 15-24   INITIAL VALUE OF THIS PARAMETER.
C
      INCLUDE 'RFINE.PRM'
      INCLUDE 'XPAR.INC'
      INCLUDE 'E.INC'
      DIMENSION ITEM(3)
C
      INCLUDE 'SHIFT.INC'
C
      IF(NPAR.EQ.0)RETURN
      WRITE(IOUT,12)
      DO 300 I=1,NPAR
      READ(IN,10)(PARNAM(J,I),J=1,2),ITEM,PAR(I)
      IPAR(I)=IPAK(ITEM(1),ITEM(2),0,ITEM(3))
      WRITE(IOUT,14)(PARNAM(J,I),J=1,2),ITEM,PAR(I)
      IF(ITEM(2).GT.6)STOP 'TOO MANY RIGID BODIES'
  300 CONTINUE
      RETURN
   10 FORMAT(2A4,3I2,F10.4)
   12 FORMAT('0SPECIAL PARAMETERS')
   14 FORMAT(1X,2A4,3(2X,I2),2X,F10.4)
      ENTRY PUNPAR
      DO 310 I=1,NPAR
      ITEM(1)=I1(IPAR(I))
      ITEM(2)=I2(IPAR(I))
      ITEM(3)=I4(IPAR(I))
      WRITE(IPUN,10)(PARNAM(J,I),J=1,2),ITEM,PAR(I)
  310 CONTINUE
      END
