d the max bonding distance. For example, PO4 groups may be</span>
<span class="sd">                defined as {(&quot;P&quot;, &quot;O&quot;): 3}.</span>

<span class="sd">    Returns: (int) the dimensionality of the structure - 1 (molecules/chains),</span>
<span class="sd">        2 (layered), or 3 (3D)</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="n">standardize</span><span class="p">:</span>
        <span class="n">structure</span> <span class="o">=</sp