      SUBROUTINE GETSYM
      implicit double precision (A-H,O-Z)
      include 'SIZES'
      include 'MOP6FILE'
      common /GEOSYM/ NDEP, LOCPAR(MAXPAR), IDEPFN(MAXPAR),
     1                LOCDEP(MAXPAR)
C***********************************************************************
C
C   GETSYM READS IN THE SYMMETRY DEPENDENCE RELATIONSHIPS.
C
C   ON EXIT     NDEP    = NUMBER OF SYMMETRY RELATIONS.
C               LOCPAR  = ARRAY OF REFERENCE FUNCTION INDICES.
C               IDEPFN  = ARRAY OF REFERENCE ATOM LOCATIONS.
C               LOCDEP  = ARRAY OF DEPENDENT ATOM LOCATIONS.
C
C***********************************************************************
C
C     LOCDEP IS THE ATOM WHOSE COORDINATES DEPEND ON THE COORDINATES OF
C     LOCPAR.
C     LOCPAR IS THE ATOM WHOSE COORDINATES ARE USED TO CALCULATE THOSE
C     OF LOCDEP
C     IDEPFN POINTS TO THE PARTICULAR FUNCTION TO BE USED (SEE NDDO)
C
C***********************************************************************
      dimension IVALUE(40),VALUE(40)
      character  TEXT(18)*60, LINE*80
      save TEXT
      data TEXT/
     1' BOND LENGTH    IS SET EQUAL TO THE REFERENCE BOND LENGTH   ',
     2' BOND ANGLE     IS SET EQUAL TO THE REFERENCE BOND ANGLE    ',
     3' DIHEDRAL ANGLE IS SET EQUAL TO THE REFERENCE DIHEDRAL ANGLE',
     4' DIHEDRAL ANGLE VARIES AS  90 DEGREES - REFERENCE DIHEDRAL  ',
     5' DIHEDRAL ANGLE VARIES AS  90 DEGREES + REFERENCE DIHEDRAL  ',
     6' DIHEDRAL ANGLE VARIES AS 120 DEGREES - REFERENCE DIHEDRAL  ',
     7' DIHEDRAL ANGLE VARIES AS 120 DEGREES + REFERENCE DIHEDRAL  ',
     8' DIHEDRAL ANGLE VARIES AS 180 DEGREES - REFERENCE DIHEDRAL  ',
     9' DIHEDRAL ANGLE VARIES AS 180 DEGREES + REFERENCE DIHEDRAL  ',
     1' DIHEDRAL ANGLE VARIES AS 240 DEGREES - REFERENCE DIHEDRAL  ',
     2' DIHEDRAL ANGLE VARIES AS 240 DEGREES + REFERENCE DIHEDRAL  ',
     3' DIHEDRAL ANGLE VARIES AS 270 DEGREES - REFERENCE DIHEDRAL  ',
     4' DIHEDRAL ANGLE VARIES AS 270 DEGREES - REFERENCE DIHEDRAL  ',
     5' DIHEDRAL ANGLE VARIES AS - REFERENCE DIHEDRAL              ',
     6' BOND LENGTH VARIES AS HALF THE REFERENCE BOND LENGTH       ',
     7' BOND ANGLE VARIES AS HALF THE REFERENCE BOND ANGLE         ',
     8' BOND ANGLE VARIES AS 180 DEGREES - REFERENCE BOND ANGLE    ',
     9' THE USER HAS TO SUPPLY THIS FUNCTION IN DEPVAR             '/
C
C TITLE OUTPUT
      write(MIOB,10)
   10 format(///5X,25HPARAMETER DEPENDENCE DATA//
     1'        REFERENCE ATOM      function NO.    DEPENDENT ATOM(S)')
C
C INPUT SYMMETRY : FUNCTION, REFERANCE PARAMETER, AND DEPENDENT ATOMS
C
      NDEP=0
   20 read(MIOA,'(A)',end=70) LINE
      call NUCHAR(LINE,VALUE,NVALUE)
C   INTEGER VALUES
      do 30 I=1,NVALUE
   30 IVALUE(I)=VALUE(I)
C   FILL THE LOCDEP ARRAY
      if (NVALUE.EQ.0.OR.IVALUE(3).EQ.0) go to 70
      do 40 I=3,NVALUE
         if (IVALUE(I).EQ.0) go to 50
         NDEP=NDEP+1
         LOCDEP(NDEP)=IVALUE(I)
         LOCPAR(NDEP)=IVALUE(1)
         IDEPFN(NDEP)=IVALUE(2)
   40 continue
   50 LL=I-1
      write(MIOB,60) IVALUE(1),IVALUE(2),(IVALUE(J),J=3,LL)
   60 format(I13,I19,I14,11I3,10(/,43X,12I3))
      go to 20
C
C CLEAN UP
   70 continue
      write(MIOB,80)
   80 format(/10X,'   DESCRIPTIONS OF THE FUNCTIONS USED',/)
      do 120 J=1,18
         do 90 I=1,NDEP
            if (IDEPFN(I).EQ.J) go to 100
   90    continue
         go to 120
  100    write(MIOB,110) J,TEXT(J)
  110    format(I4,5X,A)
  120 continue
      return
      end
