an>

        <span class="n">m</span> <span class="o">=</span> <span class="n">beads</span><span class="o">-</span><span class="n">pos</span>
        <span class="c1"># if there are beads within this cutoff, it will lead to a unstable system, so reject this sampling</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><sp