n class="comment">% Set flags</span>
            this.done = true;

            <span class="comment">% Check if it is time to search through all particles and</span>
            <span class="comment">% update verlet list</span>
            <span class="keyword">if</span> (drv.step-this.last_search &gt; this.verlet_freq)
                this.searchAll(drv);
            <span class="keyword">else</span>
                this.searchVerlet(drv);
            <span class="keyword">end</span>
        <span class="