span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span>
                   <span class="n">nx</span><span class="o">.</span><span class="n">weakly_connected_components</span><span class="p">(</span><span class="n">bonded_structure</span><span class="o">.</span><span class="n">graph</span><span class="p">))</span>

    <span class="n">components</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">graph</span> <span class="ow">i