      SUBROUTINE SWPORD(NLIST1,NLIST2,VECIN,VECOUT,NSIZ)
C 
C SUBROUTINE SWAPS ORDERING OF COORDINATES IN VECIN DEPENDING ON
C  POINTER LISTS NLIST1 AND NLIST2.
C
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      DIMENSION NLIST1(NSIZ),NLIST2(NSIZ),VECIN(3*NSIZ),VECOUT(3*NSIZ)
      CALL ZERO(VECOUT,3*NSIZ)
      DO 10 I=1,NSIZ
       IP1=3*NLIST1(I)-2
       IP2=3*NLIST2(I)-2
       CALL VADD(VECOUT(IP1),VECOUT(IP1),VECIN(IP2),3,1.D0)
 10   CONTINUE
      RETURN
      END
