An important part of the energy of a molecule or solid is the
potential energy between the nuclei
To do this, make a new copy your program ``poisson.m'' called ``poisson2.m'' and make the following modifications.
Debugging: You should find that at a separation of x=4.00 and widths sigma1=sigma2=0.5 you get results which are the same to within about 0.025 millihartree for setup parameters S=[32; 32; 32] and R=diag([16; 16; 16]) as you do for setup parameters S=[64; 64; 64] and R=diag([16; 16; 16]). (Be sure to modify and rerun ``setup.m'' to change these parameters and to make sure that the changes take effect!) More importantly, your result should change by only about 1 millihartree when you change to sigma1=sigma2=0.25 and evaluate at S=[64; 64; 64], R=diag([16; 16; 16]). All of these results should be about -0.094 hartree.
Finally, using the last of the above sets of parameters, (sigma1=sigma2=0.25, S=[64;64;64], R=diag([16; 16; 16])), calculate and save in a file for later use the values of Unum-Uself for nuclei at separations x=0.50, 1.00, 1.25, 1.50, 1.75, 2.00, 4.00 and 6.00 bohr.
Tomas Arias 2005-04-22