C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_LWSYMM       **
C**************************
C
CD-Routine: Write symmetry to MTZ file - LDM_LWSYMM
C This routine calls the MTZ library routine LWSYMM to write the symmetry 
C data (if defined) to the header of an MTZ file. The LWSYMM
C routine is called via the LDM routine because it can access
C data stored internally within the Laue Data Module and avoid having to
C duplicate such data unnecessarily.
CD-end
CD-Fortran:
      SUBROUTINE LDM_LWSYMM (MTZIDX)
CD-end
      INCLUDE 'implicit_none.finc'
C
C Purpose: Call to MTZ library LWSYMM routine using stored symmetry
C
C Author:  John W. Campbell, November 1995
C
C Arguments:
C
      INTEGER MTZIDX
CD-Parameters: 
C MTZIDX   i (R)   MTZ file index
CD-end
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C
      INTEGER ILATT
      INTEGER IFLAG
      CHARACTER*1 LTYPE 

C     INTEGER ILATT          !Lattice type 1-7
C     INTEGER IFLAG          !Parameter status flag
C     CHARACTER*1 LTYPE       !Lattice type as a character
C
C-------------------------------------------------------------------------------
C
      IF (NSYM.EQ.0) RETURN
      CALL LDM_GET_LATT (LTYPE, ILATT, IFLAG)
      CALL LWSYMM (MTZIDX, NSYM, NSYMP, ROTSYM, LTYPE, NSPGRP, 
     +             SPGNAM, PGNAM)
      RETURN
      END
