Debugging

As a test, perform a three-dimensional calculation of a hydrogen atom as follows.

  1. Using S=[64;64;64], R=diag([16; 16; 16])), X=[0 0 0], Z=1 in ``setup.m'' and sigma1=0.25 in ``ewald.m'', compute the Ewald energy of a single proton in a cell of size (16 bohr)$^3$.
  2. Then, run ``Hatoms.m'' for a single state with one electron (gbl_f=1, Ns=1) using the same parameters in ``setup.m'' as you used for the ewald calculation.
When your code functions properly (and you add the Ewald energy), you should find a total energy within 1 millihartree of the ``official'' LDA total energy published on the NIST web site1for hydrogen, -0.445671 H.



Tomas Arias 2006-04-26