                       rmax = p1.radius;
                    end
                end
                
                % Inner loop over particles in the verlet list
                for j = 1:length(p1.verlet_p)
                    p2 = p1.verlet_p(j);
                    
                    % Check if particle has been deleted
                    if (~isvalid(p2))
                        p1.neigh_p(~isvalid(p1.neigh_p)) = [];
                        continue;
                    end
                    
  