
CD-Section: Get the Symmetry Data
C A special set of routines are required to retrieve symmetry information
C as the symmetry parameter data is more complex than for the other KSM
C parameters. Routines are also available to determine systematic absences,
C list symmetry operators and
C to set up the information to enable reflections to be assigned to a standard
C assymetric unit using CCP4 routines.
C
CD-end

C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C****************************
C**     KSM_GET_SYMM       **
C****************************
C
CD-Routine: Get Full Symmetry Data - KSM_GET_SYMM
C This routine is used to get the full symmetry detail including such
C items as the space group, point group and symmetry operator matrices.
CD-end
CD-Fortran:
      SUBROUTINE KSM_GET_SYMM (NSPG, SPGNAME, PGNAME, NSYMMP, NSYMM,
     +                         RSM, RSMT, IFLAG)
CD-end
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get symmetry data
C
C Author:  John W. Campbell, July 1995 (from LDM_GET_SYMM)
C
C Arguments:
C
      INTEGER NSPG
      CHARACTER*(*) SPGNAME
      CHARACTER*(*) PGNAME
      INTEGER NSYMMP
      INTEGER NSYMM
      REAL    RSM(4,4,192)
      REAL    RSMT(4,4,192)
      INTEGER IFLAG

CD-Parameters:
C  NSPG     i (W)   Space group number (will be 0 if symmetry operators 
C                   were input explicitly.
C  SPGNAME  c (W)   Space group name (will be blank if symmetry operators 
C                   were input explicitly) (10 characters)
C  PGNAME   c (W)   Point group name (10 characters)
C  NSYMMP   i (W)   No. of primitive symmetry operators
C  NSYMM    i (W)   Total number of symmetry operators (0 if symmetry not
C                   defined)
C  RSM()    r (W)   The NSYMM symmetry operators -  dimensioned (4,4,192)
C  RSMT()   r (W)   The NSYMM inverted symmetry operators -dimensioned 
C                   (4,4,192)
C  IFLAG    i (W)   Flag = -1 undefined value
C                        =  0 default value
C                        =  1 value set explicitly
C                        =  2 value set globally
CD-end
C
C====== GLOBALS:
C
      INCLUDE 'ksm_data.finc'
      EXTERNAL KSM_BDAT
C
C====== LOCALS:
C
      INTEGER I, J, K
C
C-------------------------------------------------------------------------------
C
      NSPG = NSPGRP
      SPGNAME = SPGNAM
      PGNAME = PGNAM
      NSYMMP = NSYMP
      NSYMM = NSYM
      IF (NSYM.GT.0) THEN
         DO 30 K = 1, NSYMM
            DO 20 J = 1, 4
               DO 10 I = 1,4
                  RSM(I,J,K) = ROTSYM(I,J,K)
                  RSMT(I,J,K) = RSMINV(I,J,K)
10             CONTINUE
20          CONTINUE
30       CONTINUE
      END IF
      IFLAG = IS_SYMM
      RETURN
      END
