``test_atomsC.c'': Carbon

Run your code with the same $\alpha$, 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 $1s^2 2s^2 2p^2$, 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, compare your results with the official results

http://physics.nist.gov/PhysRefData/DFTdata/Tables



Tomas Arias 2006-02-25