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);
}
Exemplo n.º 3
0
void setup_tfk(functional &f)
{
  f.describe(XC_TFK, XC_LDA,
	     "Thomas-Fermi Kinetic Energy Functional",
	     "Thomas-Fermi Kinetic Energy Functional\n"
	     "\n"
	     "Implemented by Andre Gomes.\n"); 
  SET_LDA_ENERGY_FUNCTION(f,energy);
  const double d[] =
    {1., .8};
  const double ref[] =
    { 7.64755771625168, 7.08107195949229, 7.08107195949229, 2.62261924425641, 2.62261924425641, 2.62261924425641 };
  f.add_test(XC_VARS_AB,1,d,ref,1e-5);

}
Exemplo n.º 4
0
void setup_pbec(functional &f)
{
  f.describe(XC_PBEC, XC_GGA,
	     "PBE correlation functional",
	     "PBE correlation functional.\n"
	     "J.P. Perdew, K. Burke, and M. Ernzerhof, Generalized\n"
	     "gradient approximation made simple, "
	     "Phys. Rev. Lett. 77 (1996) 3865-3868\n"
	     "Implemented by Ulf Ekstrom\n");
  SET_GGA_ENERGY_FUNCTION(f,energy);
  // Test case from http://www.cse.scitech.ac.uk/ccg/dft/data_pt_c_pbe.html
  const double d[5] = 
    {0.39E+02, 0.38E+02, 0.81E+06, 0.82E+06,0.82E+06};
  const double ref[21] =
    {-0.184442072405E+01,   

     -0.814334534280E-01,
     -0.820182123795E-01,  
     0.510839298939E-06,
     0.102167859788E-05,
     0.510839298939E-06,  



     -0.124297349784E-02,
     -0.183505806584E-02,
     0.134850158624E-07, 
     0.269700317248E-07,  
     0.134850158624E-07,
     -0.125767116982E-02,
     0.136189478240E-07,
     0.272378956480E-07,    
     0.136189478240E-07,
     -0.216571369852E-12,
     -0.433142739704E-12,
     -0.216571369852E-12,  
     -0.866285479407E-12,
     -0.433142739704E-12,
     -0.216571369852E-12, 
    };
  f.add_test(XC_VARS_AB,2,d,ref,1e-11);
}