




      SUBROUTINE NMR110 (IAA,XYZH,IERR)

















      IMPLICIT      NONE
      INCLUDE       'BIGINC.INC'
      INTEGER       IERR, IAA, IAT, JATARR(4), NUM
      REAL          XYZH(3), V1(3), V2(3)







      IERR=0
      XYZH(1)=0.0
      XYZH(2)=0.0
      XYZH(3)=0.0
      IAT=PNTAAS(IAA)



      IF (WIFPAR(84).NE.0) THEN
         CALL FBONDH (IAT,JATARR,4,NUM)
         IF (NUM.EQ.1) THEN
            IF (ISATOK(JATARR(1))) THEN
               XYZH(1)=XCOORD(JATARR(1))
               XYZH(2)=YCOORD(JATARR(1))
               XYZH(3)=ZCOORD(JATARR(1))
               CALL DIF015 (6,'?M2177',IAT)
               GOTO 998
            END IF
         END IF
      END IF



      CALL FBONDA (IAT,JATARR,4,NUM)
      IF (NUM.NE.2) THEN
         IERR=1
         GOTO 998
      END IF
      V1(1)=XCOORD(JATARR(1))-XCOORD(IAT)
      V1(2)=YCOORD(JATARR(1))-YCOORD(IAT)
      V1(3)=ZCOORD(JATARR(1))-ZCOORD(IAT)
      CALL GVSNM3 (V1)
      V2(1)=XCOORD(JATARR(2))-XCOORD(IAT)
      V2(2)=YCOORD(JATARR(2))-YCOORD(IAT)
      V2(3)=ZCOORD(JATARR(2))-ZCOORD(IAT)
      CALL GVSNM3 (V2)
      CALL GVSBV3 (XYZH,V1,V2)



      CALL GVSNM3 (XYZH)



      XYZH(1)=XCOORD(PNTAAS(IAA))-XYZH(1)
      XYZH(2)=YCOORD(PNTAAS(IAA))-XYZH(2)
      XYZH(3)=ZCOORD(PNTAAS(IAA))-XYZH(3)



  998 CONTINUE


      RETURN
      END
