next up previous contents
Next: ``test_atomsX.c'': an atom of Up: Putting it all together Previous: Debugging

``test_atomsC.c'': Carbon

Run your code with the same tex2html_wrap_inline436 , number of intervals N, change of variables r(x) and form for exchange and correlation as in Problem 2.1.1, but now compute the total energy of Carbon. A suitable initialization for Carbon, which has the electronic structure tex2html_wrap_inline456 , is

  /* Specs for C */
  Z=6.;
  lmax=1;

  nmax=ivector(0,lmax);
  nmax[0]=1;
  nmax[1]=0;

  nmaxmax=0;
  for (l=0; l<=lmax; l++)
    if (nmax[l]>nmaxmax) nmaxmax=nmax[l];

  F=dmatrix(0,lmax,0,nmaxmax);
  F[0][0]=2.; /* 1s */
  F[0][1]=2.; /* 2s */
  F[1][0]=2.; /* 2p */

Again, your results with the official results

http://math.nist.gov/DFTdata/atomdata/tables


Tomas Arias
Wed Mar 8 14:29:40 EST 2000