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 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 _psi_src_lib_libmints_potential_h_
30 #define _psi_src_lib_libmints_potential_h_
31 
32 #include <vector>
33 #include "psi4/libmints/typedefs.h"
34 #include "psi4/libmints/onebody.h"
36 #include "psi4/libmints/osrecur.h"
37 
38 namespace psi {
39  class BasisSet;
40  class GaussianShell;
41  class IntegralFactory;
42  class SphericalTransform;
43  class CdSalcList;
44 
50 class PotentialInt : public OneBodyAOInt
51 {
53  void compute_pair(const GaussianShell&, const GaussianShell&);
56  void compute_pair_deriv1(const GaussianShell&, const GaussianShell& );
57  void compute_pair_deriv2(const GaussianShell&, const GaussianShell& );
58 
59 protected:
62 
65 
66 public:
68  PotentialInt(std::vector<SphericalTransform>&, std::shared_ptr<BasisSet>, std::shared_ptr<BasisSet>, int deriv=0);
69  virtual ~PotentialInt();
70 
72  virtual void compute_deriv1(std::vector<SharedMatrix > &result);
73 
75  virtual void compute_deriv1_no_charge_term(std::vector<SharedMatrix > &result);
79 
81  virtual void compute_deriv2(std::vector<SharedMatrix>& result);
82 
84  void set_charge_field(SharedMatrix Zxyz) { Zxyz_ = Zxyz; }
85 
87  SharedMatrix charge_field() const { return Zxyz_; }
88 
90  bool has_deriv1() { return true; }
91 };
92 
94 {
95  int natom_;
96 public:
97  PotentialSOInt(const std::shared_ptr<OneBodyAOInt>& , const std::shared_ptr<IntegralFactory> &);
98  PotentialSOInt(const std::shared_ptr<OneBodyAOInt>& , const IntegralFactory*);
99 
107  void compute_deriv1(std::vector<SharedMatrix > result,
108  const CdSalcList& cdsalcs);
109 };
110 
111 }
112 
113 #endif
Definition: onebody.h:55
Computes potential integrals. Use an IntegralFactory to create this object.
Definition: potential.h:50
virtual void compute_deriv1(std::vector< SharedMatrix > &result)
Computes the first derivatives and stores them in result.
Definition: potential.cc:779
ObaraSaikaTwoCenterVIRecursion * potential_recur_
Recursion object that does the heavy lifting.
Definition: potential.h:61
virtual ~PotentialInt()
Definition: potential.cc:93
Definition: cdsalclist.h:124
void compute_pair_deriv1(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:203
void compute_pair(const GaussianShell &, const GaussianShell &)
Computes integrals between two shell objects.
Definition: potential.cc:100
virtual void compute_deriv2(std::vector< SharedMatrix > &result)
Computes the second derivatives and store them in result.
Definition: potential.cc:880
PotentialSOInt(const std::shared_ptr< OneBodyAOInt > &, const std::shared_ptr< IntegralFactory > &)
Definition: potential.cc:921
virtual void compute_deriv1_no_charge_term(std::vector< SharedMatrix > &result)
Computes the first derivatives and stores them in result.
Definition: potential.cc:838
void compute_pair_deriv2(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:505
Definition: sointegral_onebody.h:40
Definition: potential.h:93
void compute_shell_deriv1_no_charge_term(int, int)
Definition: potential.cc:821
Gaussian orbital shell.
Definition: gshell.h:189
Definition: integral.h:384
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
void compute_deriv1(std::vector< SharedMatrix > result, const CdSalcList &cdsalcs)
Definition: potential.cc:933
int natom_
Definition: potential.h:95
void set_charge_field(SharedMatrix Zxyz)
Set the field of charges.
Definition: potential.h:84
int deriv() const
What order of derivative was requested?
Definition: onebody.h:130
Obara and Saika recursion object for potential integrals.
Definition: osrecur.h:103
bool has_deriv1()
Does the method provide first derivatives?
Definition: potential.h:90
SharedMatrix charge_field() const
Get the field of charges.
Definition: potential.h:87
SharedMatrix Zxyz_
Matrix of coordinates/charges of partial charges.
Definition: potential.h:64
void compute_pair_deriv1_no_charge_term(const GaussianShell &, const GaussianShell &)
Computes integrals between two shell objects.
Definition: potential.cc:362
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:47