PBEFunctional.h 1.91 KB
Newer Older
Francois Gygi committed
1 2
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
3 4 5 6
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
Francois Gygi committed
7 8
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
Francois Gygi committed
9 10 11 12 13 14
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
15 16 17
// PBEFunctional.h
//
////////////////////////////////////////////////////////////////////////////////
18
// $Id: PBEFunctional.h,v 1.7 2009-06-29 09:57:57 fgygi Exp $
Francois Gygi committed
19 20 21 22 23 24 25 26 27

#ifndef PBEFUNCTIONAL_H
#define PBEFUNCTIONAL_H

#include "XCFunctional.h"
#include <vector>

class PBEFunctional : public XCFunctional
{
28
  double x_coeff_, c_coeff_;
29
  std::vector<double> _exc, _exc_up, _exc_dn;
30
  std::vector<double> _vxc1, _vxc1_up, _vxc1_dn,
Francois Gygi committed
31
                 _vxc2, _vxc2_upup, _vxc2_updn, _vxc2_dnup, _vxc2_dndn;
32
  std::vector<double> _grad_rho[3], _grad_rho_up[3], _grad_rho_dn[3];
33 34

  void gcor2(double a, double a1,
Francois Gygi committed
35 36
    double b1, double b2, double b3,
    double b4, double rtrs, double *gg, double *ggrs);
37 38

  void excpbe(double rho, double grad,
Francois Gygi committed
39
    double *exc, double *vxc1, double *vxc2);
40 41 42

  void excpbe_sp(double rho_up, double rho_dn,
    double grad_up, double grad_dn, double grad,
Francois Gygi committed
43 44 45 46 47
    double *exc_up, double *exc_dn,
    double *vxc1_up, double *vxc1_dn, double *vxc2_upup, double *vxc2_dndn,
    double *vxc2_updn, double *vxc2_dnup);

  public:
48

49 50 51 52
  // constructor with variable coefficients for exchange and correlation
  // with default values 1.0
  PBEFunctional(const std::vector<std::vector<double> > &rhoe,
                double x_coeff=1.0, double c_coeff=1.0);
53

54 55
  bool isGGA() const { return true; };
  std::string name() const { return "PBE"; };
56
  void setxc(void);
Francois Gygi committed
57 58
};
#endif