lass="bp">self</span><span class="o">.</span><span class="n">get_cell</span><span class="p">(),</span>
                <span class="n">pbc</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">get_pbc</span><span class="p">()</span>
            <span class="p">)</span>

            <span class="c1"># Figure out the smallest basis vector and set it as</span>
            <span class="c1"># displacement for diagonal</span>
            <span class="k">if</span> <span 