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-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 _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 {
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 
92 class PotentialSOInt : public OneBodySOInt {
93  int natom_;
94 
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, const CdSalcList& cdsalcs);
107 };
108 
109 } // namespace psi
110 
111 #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:728
ObaraSaikaTwoCenterVIRecursion * potential_recur_
Recursion object that does the heavy lifting.
Definition: potential.h:60
virtual ~PotentialInt()
Definition: potential.cc:93
Definition: cdsalclist.h:121
void compute_pair_deriv1(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:202
void compute_pair(const GaussianShell &, const GaussianShell &)
Computes integrals between two shell objects.
Definition: potential.cc:99
virtual void compute_deriv2(std::vector< SharedMatrix > &result)
Computes the second derivatives and store them in result.
Definition: potential.cc:828
PotentialSOInt(const std::shared_ptr< OneBodyAOInt > &, const std::shared_ptr< IntegralFactory > &)
Definition: potential.cc:871
virtual void compute_deriv1_no_charge_term(std::vector< SharedMatrix > &result)
Computes the first derivatives and stores them in result.
Definition: potential.cc:785
void compute_pair_deriv2(const GaussianShell &, const GaussianShell &)
Definition: potential.cc:489
Definition: sointegral_onebody.h:40
Definition: potential.h:92
void compute_shell_deriv1_no_charge_term(int, int)
Definition: potential.cc:771
Gaussian orbital shell.
Definition: gshell.h:168
Definition: integral.h:374
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
void compute_deriv1(std::vector< SharedMatrix > result, const CdSalcList &cdsalcs)
Definition: potential.cc:881
int natom_
Definition: potential.h:93
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:101
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:353
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:48