As a non-trivial test of your variable fillings code, and to compute the energy (given in Section 3.2.1) of an isolated Ge atom at the same resolution as your solid state calculation, set the parameter X=a*[0.00 0.00 0.00] in ``setup.m'' and the parameters Ns=4 and gbl_f=[2;2/3;2/3;2/3] in ``Geatoms.m'' and rerun ``setup.m'' and ``ewald.m'' and ``Geatoms.m''. Passing the finite-difference test should be sufficient to verify your new code, and summing the resulting Ewald and electronic energies should give the value of an isolated Ge atom quoted in Section 3.2.1).
Finally, as (partial) verification that the pseudopotential indeed gives states which correspond to the valence states of the germanium atom, compare the s-p energy difference (the energy difference between the s and p states of the atom) with those from your atomic code, or equivalently, from the table at NIST 2To do this, put the statements
[Psi, epsilon]=getPsi(W); epsilonat the end of ``Geatoms.m'' (and/or run them at the command prompt immediately following your run of ``Geatoms.m''). (Note that only the 4s-4p energy difference is physical because of the arbitrary choice in zero in the definition of potential energy.) You should find agreement to within about 3 mH!
Tomas Arias 2006-04-26