Psi4
dispersion.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 dispersion_h
29 #define dispersion_h
30 
31 /**********************************************************
32 * dispersion.h: declarations -D(1-3) for KS-DFT
33 * Robert Parrish, robparrish@gmail.com
34 * 09/01/2010
35 *
36 ***********************************************************/
37 #include "psi4/psi4-dec.h"
38 #include <string>
39 
40 namespace psi {
41 
42 class Molecule;
43 class Matrix;
44 
45 class Dispersion {
46 
47 public:
48  enum C6_type { C6_arit, C6_geom };
49  enum C8_type { C8_geom };
52 
53 protected:
54 
55  std::string name_;
56  std::string description_;
57  std::string citation_;
58  std::string bibtex_;
59 
64 
65  double s6_;
66  double d_;
67  double sr6_;
68  double s8_;
69  double a1_;
70  double a2_;
71  const double *RvdW_;
72  const double *C6_;
73  const double *C8_;
74  const double *A_;
75  const double *Beta_;
76 
77 public:
78 
79  Dispersion();
80  virtual ~Dispersion();
81 
82  static std::shared_ptr<Dispersion> build(const std::string & type, double s6 = 0.0,
83  double p1 = 0.0, double p2 = 0.0, double p3 = 0.0);
84 
85  std::string name() const { return name_; }
86  std::string description() const { return description_; }
87  std::string citation() const { return citation_; }
88  std::string bibtex() const { return bibtex_; }
89  void set_name(const std::string & name) { name_ = name; }
90  void set_description(const std::string & description) { description_ = description; }
91  void set_citation(const std::string & citation) { citation_ = citation; }
92  void set_bibtex(const std::string & bibtex) { bibtex_ = bibtex; }
93 
94  std::shared_ptr<Vector> set_atom_list(std::shared_ptr<Molecule> mol);
95 
96  double get_d() const { return d_; }
97  double get_s6() const { return s6_; }
98  double get_sr6() const { return sr6_; }
99  double get_s8() const { return s8_; }
100  double get_a1() const { return a1_; }
101  double get_a2() const { return a2_; }
102 
103  void set_d(double d) { d_ = d; }
104  void set_s6(double s6) { s6_ = s6; }
105  void set_sr6(double sr6) { sr6_ = sr6; }
106  void set_s8(double s8) { s8_ = s8; }
107  void set_a1(double a1) { a1_ = a1; }
108  void set_a2(double a2) { a2_ = a2; }
109 
110  std::string print_energy(std::shared_ptr<Molecule> m);
111  std::string print_gradient(std::shared_ptr<Molecule> m);
112  std::string print_hessian(std::shared_ptr<Molecule> m);
113 
114  virtual double compute_energy(std::shared_ptr<Molecule> m);
115  virtual SharedMatrix compute_gradient(std::shared_ptr<Molecule> m);
116  virtual SharedMatrix compute_hessian(std::shared_ptr<Molecule> m);
117 
118  virtual void print(std::string OutFileRMR = "outfile", int level = 1) const;
119  void py_print() const { print("outfile", 1); }
120 };
121 
122 }
123 
124 #endif
void set_a2(double a2)
Definition: dispersion.h:108
std::shared_ptr< Vector > set_atom_list(std::shared_ptr< Molecule > mol)
Definition: dispersion.cc:450
void set_d(double d)
Definition: dispersion.h:103
Definition: dispersion.h:51
double s6_
Definition: dispersion.h:65
double get_d() const
Definition: dispersion.h:96
const double * RvdW_
Definition: dispersion.h:71
const double * C8_
Definition: dispersion.h:73
virtual SharedMatrix compute_hessian(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:445
void set_bibtex(const std::string &bibtex)
Definition: dispersion.h:92
void set_s8(double s8)
Definition: dispersion.h:106
C8_type C8_type_
Definition: dispersion.h:61
std::string print_energy(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:175
static std::shared_ptr< Dispersion > build(const std::string &type, double s6=0.0, double p1=0.0, double p2=0.0, double p3=0.0)
Definition: dispersion.cc:66
std::string bibtex() const
Definition: dispersion.h:88
Definition: dispersion.h:48
std::string print_gradient(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:187
double get_s8() const
Definition: dispersion.h:99
virtual SharedMatrix compute_gradient(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:374
double sr6_
Definition: dispersion.h:67
Definition: dispersion.h:50
std::string print_hessian(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:208
Spherical_type
Definition: dispersion.h:51
std::string name_
Definition: dispersion.h:55
const double * A_
Definition: dispersion.h:74
void py_print() const
Definition: dispersion.h:119
virtual void print(std::string OutFileRMR="outfile", int level=1) const
Definition: dispersion.cc:156
void set_description(const std::string &description)
Definition: dispersion.h:90
C6_type C6_type_
Definition: dispersion.h:60
C6_type
Definition: dispersion.h:48
void set_citation(const std::string &citation)
Definition: dispersion.h:91
const double * Beta_
Definition: dispersion.h:75
Damping_type
Definition: dispersion.h:50
double s8_
Definition: dispersion.h:68
virtual ~Dispersion()
Definition: dispersion.cc:62
C8_type
Definition: dispersion.h:49
const double * C6_
Definition: dispersion.h:72
std::string description_
Definition: dispersion.h:56
Definition: dispersion.h:50
void set_sr6(double sr6)
Definition: dispersion.h:105
void set_a1(double a1)
Definition: dispersion.h:107
double get_a2() const
Definition: dispersion.h:101
std::string citation_
Definition: dispersion.h:57
void set_name(const std::string &name)
Definition: dispersion.h:89
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
std::string bibtex_
Definition: dispersion.h:58
double a1_
Definition: dispersion.h:69
Dispersion()
Definition: dispersion.cc:58
std::string citation() const
Definition: dispersion.h:87
void set_s6(double s6)
Definition: dispersion.h:104
double a2_
Definition: dispersion.h:70
std::string name() const
Definition: dispersion.h:85
double get_a1() const
Definition: dispersion.h:100
double get_sr6() const
Definition: dispersion.h:98
Definition: dispersion.h:49
Definition: dispersion.h:48
Damping_type Damping_type_
Definition: dispersion.h:62
Definition: dispersion.h:51
double get_s6() const
Definition: dispersion.h:97
std::string description() const
Definition: dispersion.h:86
Definition: dispersion.h:50
Definition: dispersion.h:45
Spherical_type Spherical_type_
Definition: dispersion.h:63
double d_
Definition: dispersion.h:66
virtual double compute_energy(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:245