Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

I am trying to write computer code which will find the energy and density function for a atom with Z protons and N electrons. I am working in 1D for simplicity and would like to make the overall code as simple as possible (I am using Hartree units aswell). I am using also using the Hartree approximation. This is my overall algorithm:

  1. Finds hydrogen like wave-functions (i.e. no electron-election interaction)
  2. Works out density function via $n(z) = \sum_i \left | \phi_i(z) \right |^2$

  3. Works out Hartree potential $ V_H(r) = \int_0^\infty \frac{n(\vec{s})}{\left | \vec{r}-\vec{s} \right |} d\vec{s} $

  4. Uses Kohn-Sham equation to find new individual wavefuncitons $\left (-\tfrac{1}{2}\bigtriangledown^2 + \frac{Z}{\left |r \right |} + V_H(\vec{r}) + V_{EX}(\vec{r}) \right )\phi_i = \varepsilon_i \phi_i$

  5. Go back to step 2. and repeat

I am having a number of difficulties and would be very grateful for some help with any of my questions.

Firstly to compute the Hartree potential I need to turn it into a 1D problem, so we assume even spherical distribution of charge:

$ V_H(r) = \int_0^\infty 4\pi s^2 \frac{ n(s)}{\left |r-s\right |} ds $

However this blows up when r = s! I have been looking into Gauss's law but had no luck.

Any help would be great.

share|improve this question
Cross-posted to Physics. –  dmckee Mar 15 '12 at 20:31
You might want to break this up into two questions: one about the singularity in the potential, and one about the exchange-correlation term. –  Dan Mar 15 '12 at 20:52
I agree, the singularity question can be treated both mathematically and computationally, so I'm going to keep it. Exchange-correlation should be a different question. –  Aron Ahmadia Mar 16 '12 at 7:48
Why are you forcing 1D physics? The Hartree term in 3D is non-singular! $V_H=4\pi/3\int n(r,\phi,\theta, ...) r \sin \theta dr d\theta d\phi$. What is your exchange term? –  Deathbreath Mar 17 '12 at 1:52
add comment

1 Answer

up vote 2 down vote accepted

Use the Poisson equation in its differential form to obtain the Hartree potential. It has a nice form in spherical coordinates. See for example the seminal paper of Becke, in which this problem is solved for the general polyatomic case without relying on spherical symmetry.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.