      SUBROUTINE NULLER(CXVEC,IOCC,MXNAT,MXN3,NAT)
      IMPLICIT NONE
C Arguments:
      INTEGER MXNAT,MXN3,NAT
      INTEGER*2 IOCC(MXNAT)
      COMPLEX*8 CXVEC(NAT,3)
C Local variables:
      INTEGER J,L
C***********************************************************************
C This routine takes as input a complex vector with NAT3 elements
C and sets to zero those elements corresponding to "vacuum" sites.
C This is accomplished by multiplying by vector IOCC(J), whose
C elements are either 1 or 0 depending on whether site is occupied
C or "vacuum".
C Note: CXVEC should be given dimension CXVEC(NAT,3) here
C       so that first 3*NAT elements of CXVEC are employed.
C
C B.T.Draine, Princeton Univ. Obs., 90/11/1
C History:
C 90/12/15 (BTD): Corrected error in dimensioning of CXVEC.
C
C Copyright (C) 1993, B.T. Draine and P.J. Flatau
C This code is covered by the GNU General Public License.
C***********************************************************************
      DO 110 L=1,3
         DO 100 J=1,NAT
            IF(IOCC(J).EQ.0)THEN
               CXVEC(J,L)=IOCC(J)*CXVEC(J,L)
            ENDIF
  100    CONTINUE
  110 CONTINUE
      RETURN
      END
