# Solving the Kohn-Sham equation

Consider the Kohn-Sham equation \begin{align} \left( - \frac{\hbar^2}{2m} \nabla^2 + \nu_\mathrm{eff}(\mathbf{r}) \right) \varphi_j(\mathbf{r}) &= \varepsilon_j\varphi_j(\mathbf{r}) \end{align} The external potential will be considered the interaction potential of electrons and nuclei.

Then \begin{align} \nu_{eff}=-\sum_{j}^{K} \frac{e^2 \, Z_{j}}{|\mathbf{r_1}-\mathbf{R_j}|}+\int\frac{n(\mathbf{r_2})e^2}{r_{12}}\mathbf{dr_2} +\nu_{xc} \end{align}

This equation is solved by the method of a self-consistent field: $$\varphi$$ are first set, then $$n$$ is calculated from them, then the effective functional $$\nu_{eff}$$ is calculated.

However, I do not understand something.

At each step of calculating the effective potential, the term denoting the interaction of nuclei with electrons is constant? $$r_{12}$$ is the distance between electrons. In terms of this model, no changes in the coordinates of electrons occur at each step?

• Why not on the site specifically for DFT modeling? Jun 26, 2020 at 22:50

To start it is very important to be very careful when writing the relevant coordinates. In your Kohn-Sham equation you are writing the coordinate of the non-interacting electron that you are solving for as $$\mathbf{r}$$. To be consistent with this, your second equation should read:
$$v_{\mathrm{eff}}(\mathbf{r})=v_{\mathrm{ext}}(\mathbf{r})+\int\frac{n(\mathbf{r}_2)e^2}{|\mathbf{r}-\mathbf{r}_2|}d\mathbf{r}_2+v_{\mathrm{xc}}(\mathbf{r}),$$
where I replaced your expression for the external potential with $$v_{\mathrm{ext}}(\mathbf{r})$$, as to answer your question it is enough to look at the Hartree potential (the second term). In the second term you have two electron coordinates, $$\mathbf{r}$$ and $$\mathbf{r}_2$$. The first is the electron coordinate at which you are calculating the effective potential $$v_{\mathrm{eff}}(\mathbf{r})$$, and to build the full potential you need to know its value for every $$\mathbf{r}$$. The second coordinate is the coordinate at which you calculate the electron charge density $$n(\mathbf{r}_2)$$ to then build the Hartree potential. As the integral is over all space, you consider all possible values of $$\mathbf{r}_2$$. Therefore, both coordinates $$\mathbf{r}$$ and $$\mathbf{r}_2$$ are changing: you are considering all possible values for both.