anchor.diff:     real(kind = xp) :: E                 ! Total energy
      integer         :: iter      = 0     ! Number of iterations ran
      integer         :: dump_freq = 10    ! Frequency at which the system is sampled
  -   integer         :: maxiter   = 10000 ! Maximum number of iterations
  -
  -   real :: start_time, total_time
  -
  -   !---------------------------------------------
  -   ! Start time
  -   !---------------------------------------------
  -   call cpu_time(start_time)
  +   integer         :: maxiter   = 500   ! Maximum number of iterations
   
      !---------------------------------------------
      ! Read initial positions
  
positive.code:       iter = iter + 1
  
        if (mod(iter, dump_freq) == 0) then
           print*, 'Dump!'
           call compute_energy(m, r, v, Ec, Ep, E) ! Compute Ec, Ep, E at t+dt
           call write_dump(una, un, iter, Ec, Ep, E, t, r, v)
        end if
  
negative.code:    close(un)
     close(una)
  
  end program n_body
  