Psi4
wpbex_functional.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef wPBEX_FUNCTIONAL_H
29 #define wPBEX_FUNCTIONAL_H
30 
31 #include "functional.h"
32 
33 namespace psi {
34 
35 void wpbe_F(double rho, double s, double omega, double* F, double* F_rho, double* F_s);
36 
37 
43 class wPBEXFunctional : public Functional {
44 
45 protected:
46 
47  // => Specialized Parameters <= //
48 
49  // Global types (Slater, Thomas-Fermi constants)
50  double _K0_;
51  double _k0_;
52  double _s0_;
53  double _pi12_;
54 
55  double _s_min_tol_;
56  double _nu_min_tol_;
57 
58  // HJS Parameters
59  double _A_;
60  double _B_;
61  double _C_;
62  double _D_;
63  double _E_;
64 
65  std::vector<double> _Ha_;
66  std::vector<double> _Hb_;
67 
68  // F_HJS^\omega(s,nu) kernel
69  void hjs_F(double s, double nu, double* F, double* F_s, double* F_nu);
70 
71  // wB88? If so, re-scale s
72  bool B88_;
73 
74  // Set defaults up internally
75  void common_init();
76 
77 public:
78 
79  // => Constructors (Use the factory constructor, or really know what's up) <= //
80 
82  virtual ~wPBEXFunctional();
83 
84  // => Parameters <= //
85 
86  virtual void set_parameter(const std::string& key, double val);
87 
88  // => Computers <= //
89 
90  virtual void compute_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha);
91  void compute_sigma_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha, bool spin);
92 
93  void set_B88(bool B88) { B88_ = B88; }
94  bool B88() const { return B88_; }
95 };
96 
97 }
98 
99 #endif
double _s0_
Definition: wpbex_functional.h:52
std::vector< double > _Ha_
Definition: wpbex_functional.h:65
double _D_
Definition: wpbex_functional.h:62
double _s_min_tol_
Definition: wpbex_functional.h:55
Definition: wpbex_functional.h:43
double _k0_
Definition: wpbex_functional.h:51
Definition: functional.h:48
virtual ~wPBEXFunctional()
Definition: wpbex_functional.cc:42
double _nu_min_tol_
Definition: wpbex_functional.h:56
double _K0_
Definition: wpbex_functional.h:50
double _A_
Definition: wpbex_functional.h:59
double alpha() const
Definition: functional.h:126
double _B_
Definition: wpbex_functional.h:60
double _C_
Definition: wpbex_functional.h:61
bool B88_
Definition: wpbex_functional.h:72
virtual void compute_functional(const std::map< std::string, SharedVector > &in, const std::map< std::string, SharedVector > &out, int npoints, int deriv, double alpha)
Definition: wpbex_functional.cc:96
std::vector< double > _Hb_
Definition: wpbex_functional.h:66
bool B88() const
Definition: wpbex_functional.h:94
wPBEXFunctional()
Definition: wpbex_functional.cc:38
void set_B88(bool B88)
Definition: wpbex_functional.h:93
virtual void set_parameter(const std::string &key, double val)
Definition: wpbex_functional.cc:67
double _pi12_
Definition: wpbex_functional.h:53
void hjs_F(double s, double nu, double *F, double *F_s, double *F_nu)
Definition: wpbex_functional.cc:210
double _E_
Definition: wpbex_functional.h:63
void compute_sigma_functional(const std::map< std::string, SharedVector > &in, const std::map< std::string, SharedVector > &out, int npoints, int deriv, double alpha, bool spin)
Definition: wpbex_functional.cc:101
void wpbe_F(double rho, double s, double omega, double *F, double *F_rho, double *F_s)
void common_init()
Definition: wpbex_functional.cc:45