Psi4
cfunctional.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 C_FUNCTIONAL_H
29 #define C_FUNCTIONAL_H
30 
31 #include "functional.h"
32 
33 namespace psi {
34 
39 class CFunctional : public Functional {
40 
41 friend class Functional;
42 
46 public:
48  enum GGA_Type { GGA_None, B97, PBE};
50 
51 protected:
52 
53  // => Enhancement factor types <= //
57 
58  // => Specialized Parameters <= //
59 
60  // PW92 Parameters
61  double _c0_;
62  double _two13_;
63  double _d2fz0_;
64 
65  double _c0a_;
66  double _a1a_;
67  double _b1a_;
68  double _b2a_;
69  double _b3a_;
70  double _b4a_;
71 
72  double _c0p_;
73  double _a1p_;
74  double _b1p_;
75  double _b2p_;
76  double _b3p_;
77  double _b4p_;
78 
79  double _c0f_;
80  double _a1f_;
81  double _b1f_;
82  double _b2f_;
83  double _b3f_;
84  double _b4f_;
85 
86  void PW92_C(double rho, double z, double* PW92, double* PW92_rho, double* PW92_z);
87 
88  // PBE
89  double _bet_;
90 
91  // B97
93  std::vector<double> _B97_ss_a_;
95  std::vector<double> _B97_os_a_;
96 
97  // Set defaults up internally
98 
99  void common_init();
100 
101 public:
102 
103  // => Constructors (Use the factory constructor, or really know what's up) <= //
104 
105  CFunctional();
106  virtual ~CFunctional();
107 
108  // => Parameters <= //
109 
110  virtual void set_parameter(const std::string& key, double val);
111 
112  // => Computers <= //
113 
114  virtual void compute_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha);
115 
116  void compute_ss_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha, bool spin);
117  void compute_os_functional(const std::map<std::string,SharedVector>& in, const std::map<std::string,SharedVector>& out, int npoints, int deriv, double alpha);
118 
119 
120 };
121 
122 }
123 
124 #endif
double _bet_
Definition: cfunctional.h:89
double _B97_os_gamma_
Definition: cfunctional.h:94
double _b2a_
Definition: cfunctional.h:68
double _b4p_
Definition: cfunctional.h:77
std::vector< double > _B97_ss_a_
Definition: cfunctional.h:93
double _b1a_
Definition: cfunctional.h:67
double _c0a_
Definition: cfunctional.h:65
double _c0f_
Definition: cfunctional.h:79
double _b1f_
Definition: cfunctional.h:81
Definition: functional.h:48
double _c0p_
Definition: cfunctional.h:72
Definition: cfunctional.h:48
void compute_os_functional(const std::map< std::string, SharedVector > &in, const std::map< std::string, SharedVector > &out, int npoints, int deriv, double alpha)
Definition: cfunctional.cc:261
double _a1p_
Definition: cfunctional.h:73
virtual void set_parameter(const std::string &key, double val)
Definition: cfunctional.cc:84
double alpha() const
Definition: functional.h:126
double _a1a_
Definition: cfunctional.h:66
double _b1p_
Definition: cfunctional.h:74
double _c0_
Definition: cfunctional.h:61
double _B97_ss_gamma_
Definition: cfunctional.h:92
void PW92_C(double rho, double z, double *PW92, double *PW92_rho, double *PW92_z)
Definition: cfunctional.cc:426
Definition: cfunctional.h:47
double _b3a_
Definition: cfunctional.h:69
double _b4f_
Definition: cfunctional.h:84
GGA_Type gga_type_
Definition: cfunctional.h:55
Definition: cfunctional.h:49
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: cfunctional.cc:112
virtual ~CFunctional()
Definition: cfunctional.cc:42
LSDA_Type lsda_type_
Definition: cfunctional.h:54
double _b3p_
Definition: cfunctional.h:76
Meta_Type
Definition: cfunctional.h:49
double _b4a_
Definition: cfunctional.h:70
double _b3f_
Definition: cfunctional.h:83
Definition: cfunctional.h:48
double _b2p_
Definition: cfunctional.h:75
GGA_Type
Definition: cfunctional.h:48
Definition: cfunctional.h:48
void common_init()
Definition: cfunctional.cc:45
std::vector< double > _B97_os_a_
Definition: cfunctional.h:95
double _d2fz0_
Definition: cfunctional.h:63
Definition: cfunctional.h:47
Meta_Type meta_type_
Definition: cfunctional.h:56
double _a1f_
Definition: cfunctional.h:80
CFunctional()
Definition: cfunctional.cc:38
void compute_ss_functional(const std::map< std::string, SharedVector > &in, const std::map< std::string, SharedVector > &out, int npoints, int deriv, double alpha, bool spin)
Definition: cfunctional.cc:118
LSDA_Type
Definition: cfunctional.h:47
Definition: cfunctional.h:39
double _two13_
Definition: cfunctional.h:62
double _b2f_
Definition: cfunctional.h:82
Definition: cfunctional.h:49