
CD-Section: List the Symmetry Data
C Routines are  available to give listings of the currently stored symmetry.
CD-end

C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     KSM_SYMM_LIST    **
C**************************
C
CD-Routine: List Symmetry Data - KSM_SYMM_LIST
C This routine lists the symmetry data including the space group number,
C name and point group (if known) and the symmetry operators to a 
C file or a terminal.
CD-end
CD-Fortran:
      SUBROUTINE KSM_SYMM_LIST (IUN, TERM)
CD-end
      INCLUDE 'implicit_none.finc'
C
C Purpose: List symmetry information
C
C Author:  John W. Campbell, July 1995 (from LDM_SYMM_LIST)
C
C Arguments:
C
      INTEGER IUN
      LOGICAL TERM
C
CD-Parameters:     
C  IUN   i (R)   Unit no. for listing o/p
C  TERM  l (R)   .TRUE. o/p is to a terminal; .FALSE. o/p is to a file
CD-end
C
C====== GLOBALS:
C
      INCLUDE 'ksm_data.finc'
C
C====== FUNCTION TYPES:
C
      INTEGER LENSTR
C
C====== LOCALS:
C
      CHARACTER*120 STR
      INTEGER I
C
C-------------------------------------------------------------------------------
C
      STR = 'Space group number:'
      CALL STR_ADDI(STR,NSPGRP,1)
      CALL STR_ADDS(STR,', Space group name:',0)
      CALL STR_ADDS(STR,SPGNAM,1)
      CALL STR_ADDS(STR,', Point group:',0)
      CALL STR_ADDS(STR,PGNAM,1)
      IF (TERM) THEN
         CALL TTSEND (IUN,STR(1:LENSTR(STR)),1)
      ELSE
         WRITE (IUN,1001) STR(1:LENSTR(STR))
      END IF
      STR = 'Number of symmetry operators: primitive='
      CALL STR_ADDI(STR,NSYMP,0)
      CALL STR_ADDS(STR,', total=',0)
      CALL STR_ADDI(STR,NSYM,0)
      WRITE (IUN,1000)
      IF (TERM) THEN
         CALL TTSEND (IUN,STR(1:LENSTR(STR)),1)
      ELSE
         WRITE (IUN,1001) STR(1:LENSTR(STR))
      END IF
      WRITE (IUN,1000)
      DO 10 I = 1, NSYM
         CALL KSM_SYMM_STR (I, STR)
         IF (TERM) THEN
            CALL TTSEND (IUN,STR(1:LENSTR(STR)),1)
         ELSE
            WRITE (IUN,1001) STR(1:LENSTR(STR))
         END IF
10    CONTINUE
      WRITE (IUN,1000)
      RETURN
C
C====== Format statements
C
1000  FORMAT(' ')
1001  FORMAT(A)
      END
