      SUBROUTINE ARGZMAP(TARCOO,IMAP,COORD,NATOMS)
C
C     THIS ROUTINE CHECKS WHICH ATOM'S COORDINATES IN COOR ARE MATCHED
C     BY THE COORDINATES IN TARCOO. THE NUMBER IS RETURNED IN IMAP
C
CEND
C
C PROGRAMED PBY PS SEPT/92
C
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION COORD(3,NATOMS),TARCOO(3)
      DATA THRES/1.D-10/
C
      DO 10 IATOMS=1,NATOMS
         DO 11 J=1,3
            DIFF=DABS(COORD(J,IATOMS)-TARCOO(J))
            IF(DIFF.GT.THRES) GOTO 10
 11      CONTINUE
         IMAP=IATOMS
         GOTO 20
 10   CONTINUE
      WRITE(6,*) '@ARGZMAP-E Internal error, coordinates not matched'
      CALL ERREX
 20   CONTINUE
      RETURN
      END
