module volumeslicemodule
contains
subroutine volumeslice(rx,ry,rz)

	implicit none
    double precision, dimension(:), intent(in) :: rx,ry,rz
    integer p1,p2,e1,e2,n1,n2,m,i,j
    double precision comx,comy,comz,mp,mne,d1,d2,d3,d4,d5,d6,r1
    double precision :: d7(18)


!!!Slicing the atom at nuclues with width of z= -0.5 to 0.5

p1=0
d1=0.0
d2=0.0
d3=0.0

do i=1,18
  
    p1=0

    if (rz(i) < 0.1) then
        if (rz(i) > -0.1) then
                
             p1=1
             write(12,*) "Ar",rx(i),ry(i),rz(i)

        end if
    end if

    if (p1==0) then
        
        write(12,*) "Ar",d1,d2,d3

    end if

end do






end subroutine volumeslice
end module volumeslicemodule
	  
