<div dir="ltr"><span><div>Dear QE team,</div><div><br></div><div><span>In the output of an SCF run there is a printout of the components of the energy for the molecular system as a whole:<br></span></div><div><span><br></span></div><div><span style="font-family:monospace">     The total energy is the sum of the following terms:<br>     one-electron contribution =      19.21571636 Ry<br>     hartree contribution      =       4.30342859 Ry<br>     xc contribution           =     -19.27132824 Ry<br>     ewald contribution        =     -67.77379862 Ry</span><br></div><div><br></div><div><span><div>I was wondering how to hack QE 7.1 to print out an energy decomposition similar to the above, but for each individual orbital. Specifically, I would like to print out the expectation values for the following quantities:<br></div></span></div><div>-kinetic energy <br></div><div>-local potential energy<br></div><div>-non-local potential energy<br></div><div>-Hartree potential energy<br></div><div>-exchange energy<br></div><div><br></div><div>Looking through some older posts in the forum I found two items which dealt with computing kinetic energies of individual orbitals:</div><div><br></div><div><a href="https://www.mail-archive.com/users@lists.quantum-espresso.org/msg39894.html" target="_blank">https://www.mail-archive.com/users@lists.quantum-espresso.org/msg39894.html</a></div><div><a href="https://lists.quantum-espresso.org/pipermail/users/2013-November/028007.html" target="_blank">https://lists.quantum-espresso.org/pipermail/users/2013-November/028007.html</a></div><div><br></div><div>However, I can't seem to find any posts dealing with computing any of the potential energy components explicitly, and looking through the code it appears that the potential components are computed in several different places. So I was wondering if there is a simple piece of code that I can add, perhaps to electrons.f90, which will assemble and print out this information?<br></div><div><br></div><div>If anyone has experience with doing this or something similar, then I would be grateful if you would share it here!<br></div><div><br></div><div>Kind regards,</div><div><br></div><div><div>Phillip Thomas, Ph.D.<br></div><div>National Energy Research Scientific Computing Center<br></div><div>Lawrence Berkeley National Laboratory</div></div></span></div>