Psi4
potential.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 _psi_src_lib_libmints_potential_h_
29 #define _psi_src_lib_libmints_potential_h_
30 
31 #include <vector>
32 #include "psi4/libmints/typedefs.h"
33 #include "psi4/libmints/onebody.h"
35 #include "psi4/libmints/osrecur.h"
36 
37 namespace psi {
38  class BasisSet;
39  class GaussianShell;
40  class IntegralFactory;
41  class SphericalTransform;
42  class CdSalcList;
43 
49 class PotentialInt : public OneBodyAOInt
50 {
52  void compute_pair(const GaussianShell&, const GaussianShell&);
55  void compute_pair_deriv1(const GaussianShell&, const GaussianShell& );
56  void compute_pair_deriv2(const GaussianShell&, const GaussianShell& );
57 
58 protected:
61 
64 
65 public:
67  PotentialInt(std::vector<SphericalTransform>&, std::shared_ptr<BasisSet>, std::shared_ptr<BasisSet>, int deriv=0);
68  virtual ~PotentialInt();
69 
71  virtual void compute_deriv1(std::vector<SharedMatrix > &result);
72 
74  virtual void compute_deriv1_no_charge_term(std::vector<SharedMatrix > &result);
78 
80  virtual void compute_deriv2(std::vector<SharedMatrix>& result);
81 
83  void set_charge_field(SharedMatrix Zxyz) { Zxyz_ = Zxyz; }
84 
86  SharedMatrix charge_field() const { return Zxyz_; }
87 
89  bool has_deriv1() { return true; }
90 };
91 
93 {
94  int natom_;
95 public:
96  PotentialSOInt(const std::shared_ptr<OneBodyAOInt>& , const std::shared_ptr<IntegralFactory> &);
97  PotentialSOInt(const std::shared_ptr<OneBodyAOInt>& , const IntegralFactory*);
98 
106  void compute_deriv1(std::vector<SharedMatrix > result,
107  const CdSalcList& cdsalcs);
108 };
109 
110 }
111 
112 #endif
Definition: onebody.h:55
Computes potential integrals. Use an IntegralFactory to create this object.
Definition: potential.h:49
virtual void compute_deriv1(std::vector< SharedMatrix > &result)
Computes the first derivatives and stores them in result.
Definition: potential.cc:777
ObaraSaikaTwoCenterVIRecursion * potential_recur_
Recursion object that does the heavy lifting.
Definition: potential.h:60
virtual ~PotentialInt()
Definition: potential.cc:91
Definition: cdsalclist.h:124
void compute_pair_deriv1(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:201
void compute_pair(const GaussianShell &, const GaussianShell &)
Computes integrals between two shell objects.
Definition: potential.cc:98
virtual void compute_deriv2(std::vector< SharedMatrix > &result)
Computes the second derivatives and store them in result.
Definition: potential.cc:878
PotentialSOInt(const std::shared_ptr< OneBodyAOInt > &, const std::shared_ptr< IntegralFactory > &)
Definition: potential.cc:919
virtual void compute_deriv1_no_charge_term(std::vector< SharedMatrix > &result)
Computes the first derivatives and stores them in result.
Definition: potential.cc:836
void compute_pair_deriv2(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:503
Definition: sointegral_onebody.h:39
Definition: potential.h:92
void compute_shell_deriv1_no_charge_term(int, int)
Definition: potential.cc:819
Gaussian orbital shell.
Definition: gshell.h:191
Definition: integral.h:385
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
void compute_deriv1(std::vector< SharedMatrix > result, const CdSalcList &cdsalcs)
Definition: potential.cc:931
int natom_
Definition: potential.h:94
void set_charge_field(SharedMatrix Zxyz)
Set the field of charges.
Definition: potential.h:83
int deriv() const
What order of derivative was requested?
Definition: onebody.h:130
Obara and Saika recursion object for potential integrals.
Definition: osrecur.h:102
bool has_deriv1()
Does the method provide first derivatives?
Definition: potential.h:89
SharedMatrix charge_field() const
Get the field of charges.
Definition: potential.h:86
SharedMatrix Zxyz_
Matrix of coordinates/charges of partial charges.
Definition: potential.h:63
void compute_pair_deriv1_no_charge_term(const GaussianShell &, const GaussianShell &)
Computes integrals between two shell objects.
Definition: potential.cc:360
PotentialInt(std::vector< SphericalTransform > &, std::shared_ptr< BasisSet >, std::shared_ptr< BasisSet >, int deriv=0)
Constructor. Assumes nuclear centers/charges as the potential.
Definition: potential.cc:45