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-2018 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef dispersion_h
30 #define dispersion_h
31 
32 /**********************************************************
33 * dispersion.h: declarations -D(1-3) for KS-DFT
34 * Robert Parrish, robparrish@gmail.com
35 * 09/01/2010
36 *
37 ***********************************************************/
38 #include "psi4/psi4-dec.h"
39 #include <string>
40 
41 namespace psi {
42 
43 class Molecule;
44 
45 class Dispersion {
46  public:
47  enum C6_type { C6_arit, C6_geom };
48  enum C8_type { C8_geom };
51 
52  protected:
53  std::string name_;
54  std::string description_;
55  std::string citation_;
56  std::string bibtex_;
57 
62 
63  double s6_;
64  double d_;
65  double sr6_;
66  double s8_;
67  double a1_;
68  double a2_;
69  const double *RvdW_;
70  const double *C6_;
71  const double *C8_;
72  const double *A_;
73  const double *Beta_;
74 
75  public:
76  Dispersion();
77  virtual ~Dispersion();
78 
79  static std::shared_ptr<Dispersion> build(const std::string & type, double s6 = 0.0, double alpha6 = 0.0,
80  double sr6 = 0.0);
81 
82  std::string name() const { return name_; }
83  std::string description() const { return description_; }
84  std::string citation() const { return citation_; }
85  std::string bibtex() const { return bibtex_; }
86  void set_name(const std::string &name) { name_ = name; }
87  void set_description(const std::string &description) { description_ = description; }
88  void set_citation(const std::string &citation) { citation_ = citation; }
89  void set_bibtex(const std::string &bibtex) { bibtex_ = bibtex; }
90 
91  std::shared_ptr<Vector> set_atom_list(std::shared_ptr<Molecule> mol);
92 
93  double get_d() const { return d_; }
94  double get_s6() const { return s6_; }
95  double get_sr6() const { return sr6_; }
96  double get_s8() const { return s8_; }
97  double get_a1() const { return a1_; }
98  double get_a2() const { return a2_; }
99 
100  void set_d(double d) { d_ = d; }
101  void set_s6(double s6) { s6_ = s6; }
102  void set_sr6(double sr6) { sr6_ = sr6; }
103  void set_s8(double s8) { s8_ = s8; }
104  void set_a1(double a1) { a1_ = a1; }
105  void set_a2(double a2) { a2_ = a2; }
106 
107  std::string print_energy(std::shared_ptr<Molecule> m);
108  std::string print_gradient(std::shared_ptr<Molecule> m);
109  std::string print_hessian(std::shared_ptr<Molecule> m);
110 
111  virtual double compute_energy(std::shared_ptr<Molecule> m);
112  virtual SharedMatrix compute_gradient(std::shared_ptr<Molecule> m);
113  virtual SharedMatrix compute_hessian(std::shared_ptr<Molecule> m);
114 
115  virtual void print(std::string out_fname = "outfile", int level = 1) const;
116  void py_print() const { print("outfile", 1); }
117 };
118 }
119 
120 #endif
void set_a2(double a2)
Definition: dispersion.h:105
std::shared_ptr< Vector > set_atom_list(std::shared_ptr< Molecule > mol)
Definition: dispersion.cc:444
void set_d(double d)
Definition: dispersion.h:100
Definition: dispersion.h:50
double s6_
Definition: dispersion.h:63
double get_d() const
Definition: dispersion.h:93
const double * RvdW_
Definition: dispersion.h:69
const double * C8_
Definition: dispersion.h:71
virtual SharedMatrix compute_hessian(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:440
void set_bibtex(const std::string &bibtex)
Definition: dispersion.h:89
void set_s8(double s8)
Definition: dispersion.h:103
C8_type C8_type_
Definition: dispersion.h:59
std::string print_energy(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:170
static std::shared_ptr< Dispersion > build(const std::string &type, double s6=0.0, double alpha6=0.0, double sr6=0.0)
Definition: dispersion.cc:61
std::string bibtex() const
Definition: dispersion.h:85
Definition: dispersion.h:47
std::string print_gradient(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:181
double get_s8() const
Definition: dispersion.h:96
virtual SharedMatrix compute_gradient(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:367
double sr6_
Definition: dispersion.h:65
Definition: dispersion.h:49
std::string print_hessian(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:203
Spherical_type
Definition: dispersion.h:50
std::string name_
Definition: dispersion.h:53
const double * A_
Definition: dispersion.h:72
void py_print() const
Definition: dispersion.h:116
void set_description(const std::string &description)
Definition: dispersion.h:87
C6_type C6_type_
Definition: dispersion.h:58
C6_type
Definition: dispersion.h:47
void set_citation(const std::string &citation)
Definition: dispersion.h:88
const double * Beta_
Definition: dispersion.h:73
Damping_type
Definition: dispersion.h:49
double s8_
Definition: dispersion.h:66
virtual ~Dispersion()
Definition: dispersion.cc:59
C8_type
Definition: dispersion.h:48
const double * C6_
Definition: dispersion.h:70
std::string description_
Definition: dispersion.h:54
Definition: dispersion.h:49
void set_sr6(double sr6)
Definition: dispersion.h:102
void set_a1(double a1)
Definition: dispersion.h:104
double get_a2() const
Definition: dispersion.h:98
std::string citation_
Definition: dispersion.h:55
void set_name(const std::string &name)
Definition: dispersion.h:86
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
std::string bibtex_
Definition: dispersion.h:56
double a1_
Definition: dispersion.h:67
Dispersion()
Definition: dispersion.cc:57
std::string citation() const
Definition: dispersion.h:84
void set_s6(double s6)
Definition: dispersion.h:101
double a2_
Definition: dispersion.h:68
std::string name() const
Definition: dispersion.h:82
double get_a1() const
Definition: dispersion.h:97
double get_sr6() const
Definition: dispersion.h:95
Definition: dispersion.h:48
Definition: dispersion.h:47
Damping_type Damping_type_
Definition: dispersion.h:60
Definition: dispersion.h:50
double get_s6() const
Definition: dispersion.h:94
std::string description() const
Definition: dispersion.h:83
Definition: dispersion.h:49
Definition: dispersion.h:45
Spherical_type Spherical_type_
Definition: dispersion.h:61
double d_
Definition: dispersion.h:64
virtual void print(std::string out_fname="outfile", int level=1) const
Definition: dispersion.cc:153
virtual double compute_energy(std::shared_ptr< Molecule > m)
Definition: dispersion.cc:240