certik / theoretical-physics

Source code of the Theoretical Physics Reference online book
https://theoretical-physics.com
MIT License
222 stars 48 forks source link

Derivation in section "Total energy" of DFT page is unclear #58

Open RKBK opened 8 years ago

RKBK commented 8 years ago

I've been reading the DFT page, and I'm trying to understand the section on the Total energy. A short bit into that section, it is written that "If one is not careful about the potential associated with the eigenvalues, i.e., confusing V{in} with V{out}". However, where is "V_in" and "V_out" defined? It is a bit unclear if the section is trying to explain what would happen if the equations given there are used to evaluated the total energy on each iteration of the KS solution. But why would the energy after an iteration be evaluated using the previous external potential ("V_in"?)? The message of the section is a bit unclear to me.

Furthermore, the section seems to imply that the last equation of the section "Total energy" is somehow not preferable to a direct usage of the total energy expression (first equation of "total energy" section), despite the fact that several review works/text books on DFT indicate that the last expression is used in several DFT codes to calculate the total energy.

certik commented 8 years ago

Good point. I'll try to clarify that once I get to my computer. It's actually very easy to program the total energy in an incorrect way and then it will converge very slowly.

Sent from my mobile phone. On Nov 11, 2015 5:19 AM, "RKBK" notifications@github.com wrote:

I've been reading the DFT page, and I'm trying to understand the section on the Total energy. A short bit into that section, it is written that "If one is not careful about the potential associated with the eigenvalues, i.e., confusing V{in} with V{out}". However, where is "V_in" and "V_out" defined? It is a bit unclear if the section is trying to explain what would happen if the equations given there are used to evaluated the total energy on each iteration of the KS solution. But why would the energy after an iteration be evaluated using the previous external potential ("V_in"?)? The message of the section is a bit unclear to me.

— Reply to this email directly or view it on GitHub https://github.com/certik/theoretical-physics/issues/58#issuecomment-155762491 .

RKBK commented 8 years ago

Thank you, I would certainly appreciate a clarification.

Furthermore, there is another thing in the derivation that is not obvious to me. In the equation following directly after "If one is not careful about the potential associated with the eigenvalues, i.e., confusing V{in} with V{out}, one gets a slowly converging formula for the total energy. By expanding v_s using (12):" the following equality is written:

\int (V_H + V_XC + v)n(r)d^3r = 2½ \int V_H n(r) d^3r + \int V_XC n(r) d^3r + \int v n(r) d^3r

How did the 2½ get into the RHS?

certik commented 8 years ago

So as mentioned in the section http://www.theoretical-physics.net/dev/quantum/dft.html#total-energy, the V_in is the potential that is used to solve the Schroedinger equation. It is defined by the line:

We use the whole input potential $V_{in}\equiv v_s$ and its associated eigenvalues $\epsilon_i$ to calculate the kinetic energy $T_s[n]$, this follows from the derivation of the expression for $T_s[n]$. Then we use the calculated charge density to express $EH[n]$, $E{xc}[n]$ and $V[n]$.

The V_out is then the potential that you get if you take the charge density from V_in and use it to calculate the Hartree and XC terms in order to get a new potential for the next iteration. V_out is then put into some kind of a mixing scheme (non-linear iteration) in order to get a better guess for the next SCF iteration. For very simple systems, you can use V_out directly as V_in for the next SCF iteration.

@RKBK let me know if this clarifies the issue. I can then write this up in the section in a more clear way.

RKBK commented 8 years ago

Thank you, @certik , that does clarify the V_in vs V_out issue.

How about the question regarding the factor 2½, that I wrote about above?

certik commented 8 years ago

That 2½ really means 2 * 1/2 = 1. So it's just one. I should put parentheses there, then it will be clear. Good point.