v_xc</span><span class="p">)</span> <span class="o">*</span> <span class="n">s</span><span class="o">.</span><span class="n">dx</span>
    <span class="n">E</span> <span class="o">+=</span> <span class="n">exchange_correlation_energy</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="n">n</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">E</span><span class="o">.</span><span class="n">real</span></div>


<div class="viewcode-block" id="