Psi4
xfunctional.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 X_FUNCTIONAL_H
29 #define X_FUNCTIONAL_H
30 
31 #include "functional.h"
32 
33 namespace psi {
34 
40 class XFunctional : public Functional {
41 
42 friend class Functional;
43 
47 public:
50  enum SR_Type { SR_None, LSDA, GGA, Meta };
51 
52 protected:
53 
54  // => Enhancement factor types <= //
58 
59  // => Specialized Parameters <= //
60 
61  // Global types (Slater, Thomas-Fermi constants)
62  double _K0_;
63  double _C0_;
64  double _k0_;
65  double _pi12_;
66 
67  // > GGA < //
68 
69  // B/B3
70  double _B88_d_;
71  double _B88_a_;
72 
73  // PBE
74  double _PBE_kp_;
75  double _PBE_mu_;
76 
77  // B86B
78  double _B86B_mu_;
79  double _B86B_k_;
80 
81  // PW86
82  double _PW86_m_;
83  double _PW86_b_;
84  double _PW86_c_;
85 
86  // PW91
87  double _PW91_a1_;
88  double _PW91_a2_;
89  double _PW91_a3_;
90  double _PW91_a4_;
91  double _PW91_a5_;
92  double _PW91_a6_;
93 
94  // B97
95  double _B97_gamma_;
96  std::vector<double> _B97_a_;
97 
98  // > Meta < //
99 
100  std::vector<double> _Meta_a_;
101 
102  // > SR < //
103 
104  // Set defaults up internally
105 
106  void common_init();
107 
108 public:
109 
110  // => Constructors (Use the factory constructor, or really know what's up) <= //
111 
112  XFunctional();
113  virtual ~XFunctional();
114 
115  // => Parameters <= //
116 
117  virtual void set_parameter(const std::string& key, double val);
118 
119  // => Computers <= //
120 
121  virtual void compute_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha);
122 
123  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);
124 };
125 
126 }
127 
128 #endif
Definition: xfunctional.h:48
Definition: xfunctional.h:48
double _pi12_
Definition: xfunctional.h:65
double _B88_a_
Definition: xfunctional.h:71
Meta_Type
Definition: xfunctional.h:49
Definition: xfunctional.h:48
double _PW91_a2_
Definition: xfunctional.h:88
std::vector< double > _B97_a_
Definition: xfunctional.h:96
double _PW91_a6_
Definition: xfunctional.h:92
Definition: xfunctional.h:50
Definition: functional.h:48
double _PBE_mu_
Definition: xfunctional.h:75
double _B88_d_
Definition: xfunctional.h:70
double _PW91_a3_
Definition: xfunctional.h:89
GGA_Type
Definition: xfunctional.h:48
double alpha() const
Definition: functional.h:126
Definition: xfunctional.h:48
XFunctional()
Definition: xfunctional.cc:38
GGA_Type gga_type_
Definition: xfunctional.h:55
Definition: xfunctional.h:48
double _B97_gamma_
Definition: xfunctional.h:95
double _PW86_c_
Definition: xfunctional.h:84
double _PW91_a1_
Definition: xfunctional.h:87
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: xfunctional.cc:137
Definition: xfunctional.h:50
Definition: xfunctional.h:48
double _B86B_mu_
Definition: xfunctional.h:78
double _k0_
Definition: xfunctional.h:64
virtual void set_parameter(const std::string &key, double val)
Definition: xfunctional.cc:78
void common_init()
Definition: xfunctional.cc:45
double _PW86_b_
Definition: xfunctional.h:83
Definition: xfunctional.h:49
Meta_Type meta_type_
Definition: xfunctional.h:56
double _PW86_m_
Definition: xfunctional.h:82
std::vector< double > _Meta_a_
Definition: xfunctional.h:100
SR_Type
Definition: xfunctional.h:50
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: xfunctional.cc:132
Definition: xfunctional.h:50
Definition: xfunctional.h:49
double _PW91_a5_
Definition: xfunctional.h:91
double _PBE_kp_
Definition: xfunctional.h:74
double _K0_
Definition: xfunctional.h:62
Definition: xfunctional.h:40
double _C0_
Definition: xfunctional.h:63
Definition: xfunctional.h:48
Definition: xfunctional.h:50
double _PW91_a4_
Definition: xfunctional.h:90
virtual ~XFunctional()
Definition: xfunctional.cc:42
SR_Type sr_type_
Definition: xfunctional.h:57
Definition: xfunctional.h:48
Definition: xfunctional.h:48
double _B86B_k_
Definition: xfunctional.h:79