Exemplo n.º 1
0
void setup_slaterx(functional &f)
{
  f.describe(XC_SLATERX, XC_LDA,
	     "Slater LDA exchange",
	     "LDA Exchange functional\n"
	     "P.A.M. Dirac, Proceedings of the Cambridge Philosophical "
	     "Society, 26 (1930) 376.\n"
	     "F. Bloch, Zeitschrift fuer Physik, 57 (1929) 545.\n\n"
	     "Implemented by Ulf Ekstrom\n"
	     "Test case from http://www.cse.scitech.ac.uk/ccg/dft/data_pt_x_lda.html\n");

  SET_LDA_ENERGY_FUNCTION(f,slaterx);
  SET_GGA_ENERGY_FUNCTION(f,slaterx);
  SET_MGGA_ENERGY_FUNCTION(f,slaterx);

  const double d[] = 
    {0.39E+02, 0.38E+02};
  const double ref[] =
    {-0.241948147838E+03, // energy
     -0.420747936684E+01, // gradient
     -0.417120618800E+01,
     -0.359613621097E-01, // hessian
     0,
     -0.365895279649E-01 };
  f.add_test(XC_VARS_AB,2,d,ref,1e-11);
}
Exemplo n.º 2
0
void setup_lb94(functional &f)
{
  f.describe(XC_LB94,XC_GGA,
	     "LB94 Exchange-correlation functional",
	     "Exchange-correlation potential with correct asymtotic behavior\n"
	     "R. van Leeuwen and E. J. Baerends PRA 49, 2421 (1994)\n"
	     "Note that the LB94 energy is not well defined, here its"
	     "simply the SVWN5 energy, also used for order >= 2.\n"
	     "Implemented by Ulf Ekstrom.\n");

  SET_GGA_ENERGY_FUNCTION(f, lb94);

  const double d[5] =
    {
     0.39e+02,
     0.38e+02,
     0.81e+06,
     0.82e+06,
     0.82e+06
    };

  const double ref[21] =
    {
//     radovan: reference data obtained from *.c implementation in DIRAC
      -2.504589269450e+02, // 00000
      -4.326578426659e+00, // 10000
      -4.292112232065e+00, // 01000
       0.000000000000e+00, // 00100
       0.000000000000e+00, // 00010
       0.000000000000e+00, // 00001
      -3.520452674168e-02, // 20000
      -1.028611984896e-03, // 11000
       0.000000000000e+00, // 10100
       0.000000000000e+00, // 10010
       0.000000000000e+00, // 10001
      -3.578939264344e-02, // 02000
       0.000000000000e+00, // 01100
       0.000000000000e+00, // 01010
       0.000000000000e+00, // 01001
       0.000000000000e+00,
       0.000000000000e+00,
       0.000000000000e+00,
       0.000000000000e+00,
       0.000000000000e+00,
       0.000000000000e+00
    };

  f.add_test(XC_VARS_AB, 2, d, ref, 1e-11);
}