      SUBROUTINE UGLAST
c
      include 'edep1.inc'

c write energy deposition -------------
      etot = 0.0
      do i = 1, 300
         if(edepbuf(i).gt.0.0) then
            etot = etot + edepbuf(i)
            write(6,100) i, edepbuf(i)
 100     format(2x,i4,f13.3)
         end if
         end do
         write(6,200) etotal0, etot
 200     format(2x,'etot =',2f13.3)

c      write(53) elowz,elum,eqd0,eqfd1
c--------------------------------------
	CALL HROUT(1,ICYCLE,' ')
	CALL HREND('nlchit')
c--
c        CALL HRPUT(0,'neutron.hb','N')
c--
c
c	call HPLEND	! close graphics

	call glast	! clean-up and end

        close(unit=11)  ! close able event file
C  

c       call IGEND   ! This is in vanilla UGLAST but not Basem's

	return
	end



