Molecules and solids, by definition, have more than one atom. Thus, the
nuclear-nuclear interaction
, which is zero for an isolated atom, will soon
become for us an important term in the energy. When using periodic boundary
conditions, we are effectively repeating each atom in our cell infinitely
many times in a periodic arrangement throughout space. Summing the Coulomb
energy,
A very powerful technique for computing this term is the ``Ewald summation''
technique. This technique is based on the fact that, outside a spherically
symmetric charge distribution, the distribution acts just like a point
charge concentrated at the center. Thus, we can compute
with
our Poisson solver by simply replacing each of the nuclear charges with a
Gaussian containing the same net charge. The only subtlety is that the
Gaussians will inevitably overlap somewhat and not be entirely ``outside''
of each other. The full Ewald algorithm handles this correction explicitly.
For us, by choosing the Gaussians to narrow enough that the overlaps are
insignificant, we can make a workable (but not optimal) implementation of
the Ewald technique. Because your ``poisson.m'' script already gives the
energy of continuous, periodic charge distributions, you are a few changes
away from having a quick-and-dirty Ewald summation program.
From the above discussion, we see that the Ewald technique hinges on
construction of a density of the form
